LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:34 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
Open Source Consulting | Domain Registration