Couple of bash questions

Dave Mason dmason-bqArmZWzea/GcjXNFnLQ/w at public.gmane.org
Sun Oct 28 15:54:40 UTC 2007


renaming away extra .blah before final extension:
   mv "$i" "`echo X $i|sed 's/^X \([^.]*\).*\(\.[^.]*\)$/\1\2/'`"

the \. means use the . as a ..

resolving script problem:
.... "`basename $i .avi`.mp4"

The double quotes cause it to be treated as a single token.

../Dave
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list