while I'm playing with awk I came to execute like
ls -la >> a.txt ; awk {'print $5 $1'} a.txt ;
then its giving output like
53277-rw-------
52347-rw-------
how can I get space between those two friends of output .
|
while I'm playing with awk I came to execute like
then its giving output like
how can I get space between those two friends of output . |
||||
|
Just change the line to
this should print the output with spaces. Hope this helps. Edit: As suggested by McNisse you can use printf, which would provide you good output format
|
|||||
|
|
Another awk-specific technique, use the "output field separator"
The comma is crucial here. |
|||
|
|
ls. This will bite you in the back sooner or later. – gniourf_gniourf Dec 23 '12 at 10:08print $5 $1– glenn jackman Dec 23 '12 at 12:31