$ for drive in 0 1 2 3 4 5 6 7 > do > mt -f /dev/rmt/$drive status > done
shell/
fping -a -q -g 192.168.0.0/24
You can search forward as well. From the bash info manual, "8.2.5 Searching for Commands in the History": To search backward in the history for a particular string, type C-r. Typin…
#!/usr/bin/expect -f # telnet into tor and get clean path using expect spawn telnet 127.0.0.1 9051 expect "Escape character is '^]'." send "AUTHENTICATE\r" expect "250 OK" send "si…
Grep will remove all comments and sed will remove all empty lines # grep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d' Same with sed # cat /etc/squid/squid.conf | sed '/ *#/d; /^…
Cron: 30 23 * * 5 /root/backup_script backup_script #!/bin/bash FROM="/PROD/" FROMIP="192.168.142.146" TOIP="192.168.142.185" TO="/mirror" BLOG=$TO"/backup.log" function logmsg {…