Need help in writitng a script to rename file name and copy to other folder | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Need help in writitng a script to rename file name and copy to other folder

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-30-2013
pavan.yadalla pavan.yadalla is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 31 January 2013, 6:16 AM EST
Location: Hyderabad
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Wrench Need help in writitng a script to rename file name and copy to other folder

Hi All,

My requirement is as follows:

A file (say abc) will be having list of the .txt file names. I need to read this abc file line by line and rename the .txt file names inside it and move them to other folder/path.

Eg:
abc
-------
file1.txt
file2.txt
file3.txt

Output (should be present in different path)
--------
file1_bkp.txt
file2_blp.txt
file3_bkp.txt

Please help me in writitng the script. Shell: KSH

Thanks,
Pavan
Sponsored Links
    #2  
Old 01-30-2013
Scrutinizer's Avatar
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 21 October 2014, 1:48 PM EDT
Location: Amsterdam
Posts: 9,535
Thanks: 284
Thanked 2,419 Times in 2,169 Posts
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to create folder, copy file, and send email on success minnino Shell Programming and Scripting 4 10-19-2012 01:24 PM
sed to rename files in a folder - please help with script Bloomy Shell Programming and Scripting 8 06-02-2011 03:24 AM
Bash script to rename all files within a folder... dranzer UNIX for Dummies Questions & Answers 2 12-05-2010 04:18 PM
Rename folder/directory after running sort script jl487 Shell Programming and Scripting 1 04-13-2010 11:37 PM
Copy files from folder and rename them zeker Shell Programming and Scripting 4 12-24-2009 04:49 AM



All times are GMT -4. The time now is 02:22 PM.