|
Command Line Tips
Note: this is all in bash.
- Use a Unix, such as Linux or Mac OS X. Your'e really missing out
if your'e using Windows.
- Changing the file extensions of all .lsp files in a directory to .lisp
for file in `ls *.lsp`; do mv $file `basename $file lsp`lisp; done;
- Replacing text in a file.
perl -pi -e "s/old/new/g" filename.txt
- Replacing text in a bunch of files
find . -name "*.ext" -exec perl -pi -e "s/old/new/g" {} \;
|