[SGVLUG] awk question
matti
mathew_2000 at yahoo.com
Wed Aug 30 11:37:19 PDT 2006
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
More information about the SGVLUG
mailing list