Re: [OT] Command Line Change Name
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 59665
interpreted = N
texte = on 10/19/2004 3:20 pm, Donovan Brooke at dbrooke@euca.us so noted...> I need to change a bunch of image file names within a directory.> > They are labeled like:> > d_something.jpg> d_someotherthing.jpg> > (all starting with "d_").> > Is there a grep (or other) solution that will find all> these images in a directory and then change the "d_" to a> "t_"?Here's one way. Navigate to the directory in the Terminal and enter on oneline:ls | awk '{print("mv "$1)}' | sed 's/d_\(.*\)/d_\1 t_\1/' | /bin/shYou can also remove the " | /bin/sh" from the end to print out the commandswithout executing them (to make sure the command will do what you want it todo before actually running it).Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
on 10/19/2004 3:20 pm, Donovan Brooke at dbrooke@euca.us so noted...> I need to change a bunch of image file names within a directory.> > They are labeled like:> > d_something.jpg> d_someotherthing.jpg> > (all starting with "d_").> > Is there a grep (or other) solution that will find all> these images in a directory and then change the "d_" to a> "t_"?Here's one way. Navigate to the directory in the Terminal and enter on oneline:ls | awk '{print("mv "$1)}' | sed 's/d_\(.*\)/d_\1 t_\1/' | /bin/shYou can also remove the " | /bin/sh" from the end to print out the commandswithout executing them (to make sure the command will do what you want it todo before actually running it).Rob MarquardtDesigner/Resident WireheadToast Design800 Washington Avenue NorthMinneapolis MN 55401612.330.9863 v612.321.9424 fwww.toastdesign.com-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Rob Marquardt
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
mac hack (1997)
Strange intermittent WebDNA problems (2008)
[OT] CSS div/span (2004)
listfiles bug(s) (2000)
plugin-acgi, different results (1997)
Upload Feature - was (Feedback on new features) (2000)
WebMerchant 3.0 for Mac shipping now (1998)
[isfolder] and [filename] (1997)
URGENT! Locked DB's (2001)
I give up!! (1997)
Two options to consider (2008)
Europe, (1998)
pulldown menu differences (2005)
[WebDNA] OSX users (2009)
numfound=0 for a search after going into the SSL (2003)
State DB & TIme Zones (2003)
Navigator 4.01 (1997)
Fwd: HTML encoding in URLs (1997)
Hiccup ***** (1998)
Trigger: Only on Saturday (2001)