18
Jul/080
Jul/080
*nix bash while read line do – to proccess all files in a direcotry tree. because i keep forgetting….
I keep forgetting the syntx for while read.
essentially, you pipe a bunch of lines into it, and then it’ll process each line e.g.:
$find ~/video -iname ‘*avi’ -or -iname ‘*mpeg’ | while read movie ; do
mencoder [encoding options...] “$movie” -o ~/converted/`basename
“$movie”` ; done
Yay.