Linux / UNIX Tech Support Forum
This is a discussion on Omit the first line in a file within the Shell scripting forums, part of the Development/Scripting category; Hello, When I try to join 2 files, I need to omit the first line of the files. How do ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
| Sponsored Links | ||
|
|
|
||||
|
To omit something from file use grep command
Code:
grep -v "word-to-omit" filename Code:
tail -n $(wc -l filename | awk '{ print $1-1}') filename
__________________
Vivek Gite Linux Evangelist |
|
||||
|
Ash welcome to nixCraft forum.
Thanks for quick and dirty solution. I almost forget nifty sed.
__________________
Vivek Gite Linux Evangelist |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HPUX Unix comparing 2 large files line by line | raj | HP-UX | 1 | 02-11-2008 05:20 PM |
| Spliting files each line by using token | anilvrathod | Shell scripting | 0 | 12-08-2007 02:00 PM |
| Command line remote access | angelus_kit | Networking, Firewalls and Security | 7 | 09-05-2007 06:30 PM |
| SED pass a output line to another | cillo | Shell scripting | 6 | 11-01-2006 01:59 PM |
| for do loop in solaris one line | Solaris/OpenSolaris | 1 | 01-09-2006 01:35 PM | |