Save Emacs Macro« an older post

bash for loop

Snippet

Because you need a loop when you're not in tcsh.

for fn in `cat filenames.txt`; do
    echo "the next file is $fn"
    cat $fn
done
 
# my one-liner
for f in `ls *JPG`; do echo $f; gallery-post.sh $f; done

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.