| Author |
SHELL script to parse comma delimited text file
|
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
|
|
I've a text file with contents like this: I need a SHELL script to read this text file, line-by-line. The 1st field is a folder name, the next 2 fields are number of days. For each folder, the script would compare if see if any files are older than 10 days, if so, delete them. Any help to get started is much appreciated!
|
SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
|
 |
Martin Simons
Ranch Hand
Joined: Mar 02, 2006
Posts: 196
|
|
|
Investigate the commands sed and awk. There is, as a matter fo fact, a very good book about the two of them by O'Reilly.
|
 |
Chengwei Lee
Ranch Hand
Joined: Apr 02, 2004
Posts: 884
|
|
Thanks, managed to get started.
|
 |
 |
|
|
subject: SHELL script to parse comma delimited text file
|
|
|