[SGVLUG] awk question
Ramsin Savra
ramsinsavra at yahoo.com
Wed Aug 30 11:47:26 PDT 2006
Right. I'm sure there is away to let the script know that this is not a SHELL variable like $0 or $?.
I thought if I put it in "" or '' it would work but did not!
you are right, it seems awk can handle all the things I want but I'm new to awk and very close to the deadline. Will study it later.
Thanks for your response.
Regards,
R.
matti <mathew_2000 at yahoo.com> wrote:
HI Ramsin,
OK,
1st, awk can handle ALL of the operations you
are attempting to do.
while I don't have time to present the code,
I would search the net for awk tutorials/examples
which do similar operations.
> cut -f 2 file1.tmp | grep "DB" | awk ' {print $0} ' | cut -f 1-2
> d, > tables_list.tmp
>
> then tables_list file has:
>
> "4","STUDENT TABLE"
> "5","TEACHER TABLE"
>
> Then I use sed command to remove double quotes and ...
>
> Now. when I use awk is my script instead of replacing $0 with a
> line from the text file it replaces it with script name. I need to
> override this.
hmm.. ok, so in this case it is not reading
your $0 as the entire line .. instead it
thinks it's the variable for the script...
hmmm.. dang, dont have access to a unix box right now.
anyone?
matti
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.sgvlug.net/pipermail/sgvlug/attachments/20060830/d1de1ab2/attachment.html
More information about the SGVLUG
mailing list