Unix/Linux Go Back    

Extract information from file

Shell Programming and Scripting

Kindly Note - This is a Single User Post by Forum Member Don Cragun Regarding:
Extract information from file.
Please Follow The Primary Link Above to View the Full Discussion.

Old Unix and Linux 05-15-2017   -   Original Discussion by vedanta
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 20 June 2018, 11:28 AM EDT
Location: San Jose, CA, USA
Posts: 11,324
Thanks: 640
Thanked 3,944 Times in 3,371 Posts
Originally Posted by vedanta View Post
Many thanks!
One problem I am seeing here is that awk also is reading the comment lines.
Is there a way to ignore all comment lines at the very beginning? Should I need to create a separate post for this? Thanks1
If you are having problems with comments in the shell scripts that are being fed into the script you specified in post #1 in this thread, you don't need to start a new thread; otherwise, you do.

Either way you need to explain what comments need to be removed and exactly how your awk script is supposed to determine what you consider to be a "comment line at the very beginning". The only comment shown in your sample input file(s) is:


and I don't see why removing that comment from your input files will make any difference in your results. If you don't supply representative sample input files corresponding to the data you want to process, you are wasting time for all of us.