LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-08-2008, 09:31 AM   #1
Byenary
Member
 
Registered: Oct 2003
Distribution: edgy dapper feisty
Posts: 33

Rep: Reputation: 15
bash script to rename files removing one character


hello,

Got a bunch of files in a bunch of subdirs and they have the form
[456].pot ... [45668].pot
All i wanna do is get rid of the brackets.
Any suggestions.

Thx
 
Old 04-08-2008, 09:55 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,990
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
If filename is "[45668].pot" then new filename could be "${filename//[\[\]]/}".
 
Old 04-08-2008, 10:12 AM   #3
prad77
Member
 
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15
http://www.linuxquestions.org/questi...-help-631330/?

This is a similar kind. Hope it Helps.

Gentoo

Last edited by prad77; 04-17-2008 at 03:44 AM.
 
  


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
bash script? how to rename files in random way? lefty.crupps Linux - Software 15 06-08-2014 03:47 PM
Help with Bash Script - Rename Multiple Files embsupafly Programming 16 04-02-2010 03:50 AM
To rename files in a directory should I use Bash script or a Perl Script ? jamtech Programming 7 01-22-2008 11:25 PM
BASH: rename an argument of the script sylvaticus Programming 2 05-21-2007 08:20 AM
Bash script to traverse directory tree and rename files intramaweb Programming 3 10-08-2006 12:51 PM


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

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