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!

printing lines of a file

Status
Not open for further replies.

fathead

IS-IT--Management
Apr 13, 2002
154
I am taking inventory using a handheld device that uploads the barcodes to a file. When I import the barcodes the software tells me what line had an error. I need to print the lines in this file that have an error. So I need some sort of script that will parse the file for the lines I want printed, then print them. Any suggestions?

 
In the awk man page pay attention to the builtin variable NR

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Another way to do it, if the error message has a unique word you can lock on is by using the 'grep' command.

good luck

Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top