![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to delete M-^M characters from a file | hyennah | UNIX for Dummies Questions & Answers | 1 | 11-20-2008 06:17 PM |
| \r characters in the file | infyanurag | Shell Programming and Scripting | 2 | 11-07-2008 06:54 AM |
| Rename file based on first 3 characters of data in file | jchappel | UNIX for Dummies Questions & Answers | 3 | 10-01-2008 03:21 PM |
| replacing the characters in a file | trichyselva | UNIX for Dummies Questions & Answers | 2 | 01-03-2008 08:02 AM |
| funny characters at the end of file | achieve | Shell Programming and Scripting | 3 | 09-14-2006 05:39 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
cut between characters of a file
Hi All,
Need to convert file names to upper case using tr command in Unix. In a folder -> /apps/dd01/misc there are two files like: pi-abcd567sd.pdf pi-efgh1.pdf The output of should be like: pi-ABCD567SD.pdf pi-EFGH1.pdf I have used the command to work as below: for f in pi-*.pdf; do mv "$f" "pi-$(echo "$f" | cut -c 4-7 | tr '[a-z]' '[A-Z]').pdf" done How do we modify the above command so that it works out for multiple files in a folder as above. Thanks for your time and help, Regards, |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|