Re: [OT] *nix - change names-

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 66185
interpreted = N
texte = Here is something off the top of my head but I may be way off on the index numbering. I think you should get the idea though. #!/usr/bin/bash for file in `ls` $index = 1 do rename $file d_$index.new $file $index += $index done -----Original Message----- From: Donovan Brooke Sent: Mon, 06 Feb 2006 13:26:49 -0600 To: "WebDNA Talk" Subject: [OT] *nix - change names- Hello, since the list is a bit slow, I thought I'd post a challenge for you all. I need a lil unix/linux script to run on all files in a directory to change the filenames to a consecutive number with a new suffix.. for example, changing: 123.blah 253.blah to: d_1.new d_2.new etc. Any takers? Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Custom Paint, Labels, and Specialty Signage. -> <- Home and Business Embellishment/Fabrication, -> <- Glass Blowing, and Art Glass -> PH/FAX:> 1 (608) 835-2476 Web:> http://www.egg.bz | http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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/ ------------------------------------------------------------- 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:

    
  1. Re: [OT] *nix - change names- ( devaulw@onebox.com 2006)
  2. [OT] *nix - change names- ( Donovan Brooke 2006)
Here is something off the top of my head but I may be way off on the index numbering. I think you should get the idea though. #!/usr/bin/bash for file in `ls` $index = 1 do rename $file d_$index.new $file $index += $index done -----Original Message----- From: Donovan Brooke Sent: Mon, 06 Feb 2006 13:26:49 -0600 To: "WebDNA Talk" Subject: [OT] *nix - change names- Hello, since the list is a bit slow, I thought I'd post a challenge for you all. I need a lil unix/linux script to run on all files in a directory to change the filenames to a consecutive number with a new suffix.. for example, changing: 123.blah 253.blah to: d_1.new d_2.new etc. Any takers? Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Custom Paint, Labels, and Specialty Signage. -> <- Home and Business Embellishment/Fabrication, -> <- Glass Blowing, and Art Glass -> PH/FAX:> 1 (608) 835-2476 Web:> http://www.egg.bz | http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- 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/ ------------------------------------------------------------- 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/ devaulw@onebox.com

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:

WebMerchant 1.6 and SHTML (1997) Custom WebCat Prefs ... (1997) Using & in subject line (2003) creating a ShipCosts database (1997) BIG PROBLEMS with Checkboxes!!! (1998) unix permissions theory applied to db security? Or...? (2000) syntax question, not in online refernce (1997) Apache 2.0 question (AddModule mod_webcatalog.cpp) (2008) Authentication (1998) error: Too many nested [xxx] contexts (1997) refreshing IE with posted .tmpl (1997) The Classifieds template set (2003) Allow-Deny: Solved with [Getchars] (1998) Help! Missing [showif] or [hideif] (2000) Emailer problems addition (1999) Cancel Subscription (1996) Further tests with the infamous shipCost (1997) Search in 2 or more catalogs (1997) Nested vs conditional (1997) client support wanted (2006)