Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Available Unix Command

Status
Not open for further replies.

viclap

Programmer
Oct 12, 2000
39
PH
Dear All,

I'm pretty new in Unix, I wanted to know any available Unix command that will give me only the portion of a textfile.
ex.
ABCDEFGHI
ABCDEFGHI
TEKTIPS
XXCCCCC
VVVVVVV
DDDDDDD
XXXXXXX
The command will display only the text from TEKTIPS and the succeeding text after TEKTIPS.

Needed much help for this.


 
You may try this:
awk '/TEKTIPS/{++a}a' /path/to/textfile
Or this:
sed -n '/TEKTIPS/,$p' /path/to/textfile

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PHV,

Great answer! Thanks in a million! SED, I'll used SED (stream Editor) as my first exercise in UNIX.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top