On 2004-01-24 23:00:42 +0000 Graham Trott <gt@pobox.com> wrote:
lav2wav +p foo.avi | mp2enc -V -o foo.mp2
I find the whole area of regular expressions etc confusing; is there a kind
No regular expressions required. This is a search and replace for bash.
expert who could show how to get the above to work for all the files in a folder, such as
for name in *.avi do (How would I do the above with each file?)
lav2wav +p $name | mp2enc -V -o ${name/%avi/mp2}
done
In particular, how do I match just the filename and leave off the extension?
In general, you can use the basename command to do that, but using bash's replace is faster for your problem (no extra processes needed). ; basename test.c .c test -- MJR/slef My Opinion Only and possibly not of any group I know. Please http://remember.to/edit_messages on lists to be sure I read http://mjr.towers.org.uk/ gopher://g.towers.org.uk/ slef@jabber.at Creative copyleft computing services via http://www.ttllp.co.uk/