Replace word in files
Example: replace Strict with Transitional in your PHP-files sed -i -e ‘s/Strict/Transitional/’ *.php Warning! Edit files in place
A chronological documentation test project, nothing serious, really!
Example: replace Strict with Transitional in your PHP-files sed -i -e ‘s/Strict/Transitional/’ *.php Warning! Edit files in place
Q. I need to run a program called oraMon.pl. However this program is run from cron job. It report error to stderr and normal output to stdout. How do I save stdout, stderr and both into 3 separate log files? A. It is not that hard if you know howto redirect stderr, stdout and a…
Shell script to restart MySQL server if it is killed or not working monitor_mysql.bash #!/bin/bash # Shell script to restart MySQL server if it is killed or not working # due to ANY causes. # When script detects mysql is not running (it basically sends ping request # to MySQL) it try to start using…
Shell script to monitor running services such as web/http, ssh, mail etc. If service fails script will send an Email to ADMIN user monitor-linux-service.bash #!/bin/bash # Shell script to monitor running services such as web/http, ssh, mail etc. # If service fails it will send an Email to ADMIN user # ————————————————————————- # Copyright (c)…
Shell script to Finding Accounts with No Password listuserwopassword.bash #!/bin/bash # Shell script to Finding Accounts with No Password # Useful to improve system security # Copyright (c) 2005 nixCraft project # This script is licensed under GNU GPL version 2.0 or above # For more info, please visit: # http://cyberciti.biz/shell_scripting/bmsinstall.php # TODO # -…