![]() |
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 |
| 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 |
| Delete a line from a file | rohini | UNIX for Dummies Questions & Answers | 8 | 01-07-2009 06:34 AM |
| How to delete line from a file | ramezernest | UNIX for Dummies Questions & Answers | 0 | 11-01-2007 11:56 AM |
| delete line in file with sed | forever_49ers | Shell Programming and Scripting | 8 | 09-12-2007 08:39 AM |
| delete line in a file | dta4316 | Shell Programming and Scripting | 12 | 05-18-2005 10:20 AM |
| Delete line(s) from file | elchalateco | UNIX for Dummies Questions & Answers | 4 | 10-11-2002 01:25 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Delete first line from file and more....
Hello, I have to deal with several files that will be named something like this:
E00001.TXT, E00002.TXT etc. Each file will have a alpha character on the first position of the first line which I want to place in a variable, then delete the entire line leaving the remainder of text. This new file I want to be named the original filename prefixed by the character I previously extracted so the new file might be RE00001.TXT. Usually, out of habit I call tcl scripts to do file manipulation but I wanted to know if there was a fairly starighforward way to do this all in my Unix script (ksh). I don't know much about sed or awk so if you give examples with that and don't mind providing a brief description of what does what that would be helpful. Could the grep command provide all the functionality I'm asking for? TIA D |
|
||||
|
Shell, I like it, very simple, I don't think it addresses the issue of my new file containing everything except the first line though, does it? How can I get the newfile to exclude the first line from the source file, is that the cut command again?
Thx again |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|