![]() |
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 |
| Deleting a line from a flatfile using Shell Script | dinesh1985 | Shell Programming and Scripting | 14 | 07-03-2009 12:33 AM |
| Deleting column from a flatfile with delimiter | rsprabha | Shell Programming and Scripting | 5 | 10-03-2008 04:18 AM |
| Is there an efficient way in finding and deleting files? | guruparan18 | Shell Programming and Scripting | 3 | 05-27-2008 01:07 AM |
| Help with finding certain files, and then deleting | Puck | UNIX for Dummies Questions & Answers | 2 | 03-13-2007 12:18 PM |
| Finding a column in a flatfile | peter.herlihy | UNIX for Dummies Questions & Answers | 3 | 01-07-2002 08:08 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Finding a flatfile & deleting first line
I have a small script where I want to see if a file exists & then delete the first line from it.
I have code to help me find if the file exists, but I am unsure as to how to then take in the answer and remove the first line from the flatfile: This is what I have so far just to output if the file exists: for a in $(cat ~/scripts/test.txt) do if [ -f $DEST/$a ] then echo file $a exists >> ~/scripts/test2.txt else echo file $a does not exist >> ~/scripts/test3.txt fi done |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|