Category Archives: Bash script

Removing outdated ssh fingerprints from known hosts

REMOTE HOST IDENTIFICATION HAS CHANGED! $ sed -i “46 d” ~/.ssh/known_hosts Removing outdated ssh fingerprints from known hosts

Posted in Bash script | Tagged , , | Leave a comment

Extract particular table from a mysqldump file

$ awksqldump dbname.dump.sql tblname #!/bin/bash ### check parameter E_NO_ARGS=65 if [ $# -eq 2 ] then # Outputs string of specified table only awk “/Table structure for table .$2./,/UNLOCK TABLES/{print}” $1 > $1.EXTRACTED.sql elif [ $# -eq 3 ] then … Continue reading

Posted in Bash script, Database, Linux Administration, MySQL | Tagged , | Leave a comment

SQL Show Log

#!/bin/bash # —————————————————- # # SQL Show Log version 1.0 # @author Raymond S. Usbal # @usage sqlshowlog # # —————————————————- ### check parameter E_NO_ARGS=65 if [ $# -eq 0 ] then echo “SQL Show Log version 1.0 Usage: sqlshowlog … Continue reading

Posted in Bash script | Leave a comment