This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mail syntax: mail -s "any mail subject string" any@mail.com | |
# or: mail "any mail subject string" any@mail.com | |
if [ $1 == "-s" ] | |
then | |
subject=$2 | |
recip=$3 | |
else | |
subject=$1 | |
recip=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Remove the directory and its content (all files and subdirectories). | |
* @param string $dir the directory name | |
*/ | |
function rmrf($dir) { | |
foreach (glob($dir) as $file) { | |
if (is_dir($file)) { | |
rmrf("$file/*"); | |
rmdir($file); | |
} else { |