Is there a way I can use 'awk' to return the last field of a query. For instance, lets say I have a file named 'abc def.txt' (Note: there is a white space between 'abc' and 'def.txt'). When I run the following command it does not return the complete file name for files with spaces in their name...
So the result for filename 'abc def.txt' would be...
Whereas a file named '123.txt' lists as...
Thanks all.
gaspence
Code:
ls -lTp | awk '{print $6, $7, $9, $10}'
So the result for filename 'abc def.txt' would be...
Code:
12 Jan 2005 abc
Whereas a file named '123.txt' lists as...
Code:
12 Jan 2005 123.txt
Thanks all.
gaspence