Listmates, I am trying to translate filenames for our digital camera pictures. The problem being that we have 2 identical Kodak digital cameras and they each store pictures in the filename format 100_1234.jpg To avoid the duplicate filename problems that will occur (100_1235 and from the other 100_1235) I want a quick script to translate the filenames on one camera to something other than 100_xxx. I have a small script that can do that, but instead of just a static change to 101_xxx, I would like to change the 100 into something more useful, like a date. The problem is that I cannot get sed to allow substitution of a value contained in the sed expression. So far, I can do: for i in $(ls); do ORIG_FNAME=$i NEW_FNAME=$(echo $i | sed -e 's/^100/101zd/') which is fine. What I want to do is something like: for i in $(ls); do ORIG_FNAME=$i NEW_FNAME=$(echo $i | sed -e 's/^100/`date +%Y%m%d`/') This is where the trouble comes in. I can't see a way to accomplish this. Anybody have any ideas? I guess I could turn the problem around and grab the numerical part on the right side of the _ with sed and then concatenate the date to that. However, if this is a way to work a variable into sed, that would be great. Any ideas? -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org