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  
Administrator
 
Join Date: Jul 2012
Last Activity: 11 December 2017, 5:53 AM EST
Location: San Jose, CA, USA
Posts: 10,766
Thanks: 590
Thanked 3,768 Times in 3,216 Posts
Quote:
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:

Code:
#!/bin/ksh

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.