[K12OSN] Most Bash scripting questions? :)

Huck dhuckaby at paasda.org
Thu Dec 11 18:24:03 UTC 2008


I cat a file...   .bash_history in this case.

it has...

ls
cd RadioMadness
ls
cd /home/torkch/profile/Desktop/
ls Research\ Paper/
rm -rf Research\ Paper/
ls
rm Thumbs.db
cd /home/wincst/
ls
ls Physics/
rm -rf Physics/


for examply...


I want to strip out and KEEP... all lines that say

cd /home/

and keep that in a separate file...

Thanks for the help you Lovely Bash Script Gurus!!!




More information about the K12OSN mailing list