This file contains hidden or 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
| find ./ *.php -exec perl -pi -e 's/\/old\/tree\/path/\/new\/path\/tree/' {} \; |
This file contains hidden or 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
| # replace 'http:' w/ 'https:' in all files within the current directory. | |
| sed -i 's/http:/https:/g' ./* |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # | |
| # The gist example here does not perform any sanity or error checking. It's just a gist. | |
| # | |
| # example: resize an image file to 150px width... | |
| # ./convert.sh example.jpg 150 | |
| # | |
| $FILENAME=$1 | |
| $WIDTH=$2 |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| echo -e "Listing "established" network connections:\n" | |
| netstat -punt | grep -i "udp\|tcp" | awk {'print $4"\t"$1 '} | sed s/.*:// |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| for i in `echo $PATH | sed 's/\:/\n/g'`; do ls -a $i; done |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| echo "Total # of files available within your executable PATH: " | |
| for i in `echo $PATH | sed 's/\:/\n/g'`; do ls -a $i; done | wc -l |
NewerOlder