Lazy Hacker Babble

Just some random babblings from a lazy hacker…

bash 1-liners loop through files

Posted by hsin on July 19th, 2008

cat filestodelete.txt | while read line; do rm ${line}; done

for s in `cat server.list`; do ssh $s uptime; done;

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>