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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is this grep doing

Status
Not open for further replies.

tuka

Technical User
Jul 6, 2001
438
US
I found this script and I am trying to adapt it for my use
but I don't know what this grep statement is doing.


set db_tape=`/opt/openv/volmgr/bin/vmquery -bx -rn 0 | sort | grep Offs | grep '\-\-\-'|head -1 | awk '{print $1}'`

Can someone help me out on the grep.

Thanks !!!

 
the 1 grep looks for lines containing 'Offs'
the second for '---' the backslashes are needed to mask '-'
------------ jamisar
Einfachheit ist das Resultat der Reife. (Friedrich Schiller)
Simplicity is the fruit of maturity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top