LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-09-2007, 05:05 AM   #1
PlymWS
Member
 
Registered: Aug 2006
Posts: 48

Rep: Reputation: 15
Removing special characters from filenames


I have a load of files that are named "zip1.zip", "zip2.zip" etc ..

I would like to remove the " from the filenames using single shell command rather than manually renaming them all. I have experimented with various commands but they don't remove the special character (") from the filename.

What command should I use to rename the files ?

Thanks.
 
Old 08-09-2007, 05:11 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Code:
for file in \"*\"; do
   mv "$file" "${file//\"/}"
done
 
  


Reply

Tags
remove, rename


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
removing file with special characters rsashok Linux - General 4 02-09-2010 04:08 PM
Strip special characters from filenames General Linux - Software 1 05-14-2006 03:49 AM
Special characters in filenames gmartin Linux - General 2 01-05-2006 08:22 PM
bash and filenames with special characters CoolAJ86 Programming 2 03-09-2005 02:50 PM
smbclient and filenames with special characters cloro_x Linux - Newbie 0 07-30-2001 04:15 PM


All times are GMT -5. The time now is 01:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration