![]() |
|
|||||||
| Home | Forums | Register | Rules & FAQ | Donate | Members List | 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 here. |
![]() |
|
|
Submit Tools | Thread Tools | Search this Thread | Display Modes |
|
|||
|
deleteing
Dear Experts ,
I have 15 files and each files contains the data as mentioned below fileA name company salary job location nationality 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 sports fottbal basket ball total=888 I need a script which can remove the first two lines and the last two lines of each files .means i need a for loop for so that i cann process the 15 files. the data which should remain is as mentioned below. 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 12121 234234 13123 thanks |
| Forum Sponsor |
|
|
|
|||
|
Something like:
Code:
awk '$1 ~ /^[0-9]/{print}'
|
| Forum Sponsor |
|
|
|
|||
|
Hi, whether the above one or this one:
Code:
grep "^[0-9][0-9]*" <filenames> |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Deleteing archived files | ramu_indian | Linux | 4 | 1 Week Ago 08:02 AM |
| deleteing .doc file | agarwalniru | UNIX for Dummies Questions & Answers | 2 | 05-25-2007 11:18 AM |
| Showing that something is deleteing | nhatch | Shell Programming and Scripting | 1 | 05-06-2003 08:16 AM |