![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Changing old file name to new one if the old file name satisfied certain condition | balzzz | UNIX for Dummies Questions & Answers | 1 | 02-17-2008 10:41 AM |
| sed and changing the file itself | melanie_pfefer | Shell Programming and Scripting | 2 | 01-22-2008 11:19 PM |
| changing to a different file | kev269 | Shell Programming and Scripting | 5 | 04-11-2006 11:07 AM |
| Changing Pattern in a file | pbtenneti | Shell Programming and Scripting | 0 | 03-15-2006 06:58 AM |
| changing file permissions | gagansharma | Shell Programming and Scripting | 0 | 11-27-2001 11:26 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Changing the File Name
Dear all,
I want to change all the File name in a folder from File1.txt to File1YYYYMMDD.txt where YYYYMMDD is the date of the file is renamed. I have used the following scripts:- ******************************************************** #!/bin/ksh A=`date +"%d%m%Y" for in [File]* do mv $i $i$A.txt done ******************************************************** But when I used this script, all the file is instead changed into File1.txtYYYYMMDD.txt How do I remove the first .txt after the character File1? Please advised on this. Thanks alot. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|