LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2008, 07:04 AM   #16
Kenhelm
Member
 
Registered: Mar 2008
Location: N. W. England
Distribution: Mandriva
Posts: 333

Rep: Reputation: 141Reputation: 141

If you have the GNU version of sed the \U operator can be used to simplify turning the first letter of each word to uppercase:-

Code:
for old in [0-9][0-9]-*_-_www.*.com.mp3;do
  new=$(echo $old | sed '
  s/_-_www\..*\.com//
  s/-/ - /g
  s/_/ /g
  s/ [a-z]/\U&/g
  s/^[0-9][0-9] - //')
  if [ ! -f "$new" ]; then mv "$old" "$new"; fi 
done
 
Old 04-27-2008, 07:12 AM   #17
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Thank you for that tip. I was looking for it but searched the wrong place in the info manual.
 
Old 03-26-2010, 04:57 PM   #18
renamer
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
I use Thunar, available in Synaptic. The renaming feature is fairly simple. I use it several times daily renaming 10 to 35 pictures at the same time.

File Renamer
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch Script to rename files... jamie_barrow Linux - Newbie 16 06-14-2009 02:26 PM
rename files using bash? ferradura Linux - General 4 09-14-2007 04:35 AM
rename several files in bash or python xeon123 Linux - Newbie 2 04-02-2007 10:08 AM
Bash - Batch File Rename Help... emailarron Linux - Newbie 4 01-26-2006 08:35 AM
Got a script to rename a batch of files? jamie_barrow Linux - General 1 08-08-2003 07:52 AM


All times are GMT -5. The time now is 11:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration