Hello ,
I wrote a awk script , line by line. each line is an awk one liner.
now I want to intergrate all lines into one AWK script.
I tried to do that for more than couple of hours but no success. each line runs perfect by itself... I must be doing sothing wrong here.
I would appricate your help:
ls -ltr --full-time -p | awk '{print $9, $6, $7}' > ~menyl/gg_list # takes all libs and files after sorting with full time
awk '{if ($1 ~/\//) {print} else {} }' ~menyl/gg_list > ~menyl/atf_list # remove all files that are not directories
awk 'BEGIN {FS= "." } 1==1 {print $1}' ~menyl/atf_list > ~menyl/array_list # remove the long time suffix
awk '{print $2, $3, $1}' ~menyl/array_list > ~menyl/finalarray_list # change the order of the fields
awk 'BEGIN {FS= "/" } 1==1 {print $1}' ~menyl/finalarray_list > ~menyl/finalarray_list2 ##
Thank you very much
meny
I wrote a awk script , line by line. each line is an awk one liner.
now I want to intergrate all lines into one AWK script.
I tried to do that for more than couple of hours but no success. each line runs perfect by itself... I must be doing sothing wrong here.
I would appricate your help:
ls -ltr --full-time -p | awk '{print $9, $6, $7}' > ~menyl/gg_list # takes all libs and files after sorting with full time
awk '{if ($1 ~/\//) {print} else {} }' ~menyl/gg_list > ~menyl/atf_list # remove all files that are not directories
awk 'BEGIN {FS= "." } 1==1 {print $1}' ~menyl/atf_list > ~menyl/array_list # remove the long time suffix
awk '{print $2, $3, $1}' ~menyl/array_list > ~menyl/finalarray_list # change the order of the fields
awk 'BEGIN {FS= "/" } 1==1 {print $1}' ~menyl/finalarray_list > ~menyl/finalarray_list2 ##
Thank you very much
meny