![]() |
|
|
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 |
| How to make a function friend to both base and derived class | ennstate | High Level Programming | 3 | 05-29-2008 08:11 PM |
| How to make a loop base on reading a file? | JohnBalayo | HP-UX | 3 | 04-02-2008 12:58 AM |
| How to build as web base File Server | satimis | Ubuntu | 1 | 01-05-2008 08:56 AM |
| Reading 5 Students names and grades using while loop???? | dlbomber1 | Shell Programming and Scripting | 1 | 11-26-2007 02:46 AM |
| Using loop reading a file,retrieving data from data base. | Sonu4lov | Shell Programming and Scripting | 1 | 01-19-2007 03:38 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to make a loop base on reading a file?
To make it clearer:
I have a file, List.txt List.txt contains: (these are actually splitted files w/c I got from ls command and dump them to the List.txt file) SAMPLEa SAMPLEb SAMPLEc SAMPLEd SAMPLEe SAMPLEf . . . . . And I want to rename these files to have a .dat extension. (ie. SAMPLEa.dat, etc…) Please see code snippet below. It’s not working and your valuable suggestion will be highly appreciated. #!/bin/csh # Looping cat list.txt | while read line do mv $line $line.dat done Thanks in advance for the help… Last edited by JohnBalayo; 04-02-2008 at 03:14 AM.. Reason: To make the question clearer. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|