![]() |
why is doesnt work? (awk, set)
set DBB = /goog/db/
ls -ltr db/ | awk '{print$DBB,$9}' I want to add "/goog/db/" for each line with awk. |
Since you are removing all of the items supplied by the -l option, why use it? You could use print just the filenames as is normal and add '/goog/db/' before each line.
My version of ls starts the filename at field 8: Code:
ls -ltr | awk -v DBB=/goog/db/ 'NR>1 { printf DBB; for (i=8;i<NF;i++) printf "%s ", $i ; printf $NF"\n"}' |
Code:
find -printf "/goog/db %f\n" |
Try it without spaces on both sides of the = sign.
End |
|
| All times are GMT -5. The time now is 06:47 PM. |