LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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

Closed Thread
 
Search this Thread
Old 08-20-2008, 10:29 AM   #1
neo2k
LQ Newbie
 
Registered: Aug 2008
Posts: 21

Rep: Reputation: 15
Question copy and rename the existing directory using BASH script


Hi Guys,

i am trying to create a script to copy a single existing directory to multiple copies and rename those copies sequentially in bash script.

for e.g.

my existing directory is Itr1_b1_w1_130 and i want to make multiple copies of this directory and this should be renamed as Itr2_b1_w1_130, Itr3_b1_w1_130....Itr40_b1_w1_130.

I know i have to use the for loop to get this work.

Any help or clues to get this work done would be really helpful.Appreciate your help.

Thanks

p.s i also posted this in LINUX-newbie forum too.
 
Old 08-20-2008, 10:35 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,012

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
I think you need to read the LQ Rules: http://www.linuxquestions.org/linux/rules.html
Especially these bits:

- Do not expect LQ members to do your homework
- Do not post the same discussion in more than one forum.
 
Old 08-20-2008, 10:37 AM   #3
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,498

Rep: Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956Reputation: 1956
Quote:
Originally Posted by neo2k View Post
p.s i also posted this in LINUX-newbie forum too.
Multiple posts of the same message is not allowed. If you want the post to be moved to another forum, ask to a moderator. I replied to your other thread. This is reported for closure.
 
Old 08-20-2008, 10:43 AM   #4
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread


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 - rename directory to overwrite existing LarsWestergren Linux - Newbie 18 04-04-2013 02:07 PM
mulitple copy a existing directory and rename it at the end sequentially in BASH neo2k Linux - Newbie 2 08-20-2008 10:45 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
[SOLVED] A bash script to automatically copy all documents with directory structure thelordmule Programming 8 11-30-2007 02:30 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 09:41 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