Simple question, having a ls -l
command it makes a list on the command prompt and if we want to manipulate it we pipeline it with awk
command, for instance if we want to to show specific files.
Is that possible without using the awk
command but instead using a shell script, if so what would be the column variables how would we manipulate that on fly list do you have also any suggestions on educative links or books.
EDIT:for example a ls -l|awk '{print $1}'
the $1
is referring to the first column,is there any way to do that with a shell script variable, for instance if we would like to run the ls -l
command inside a shell script and print the exact filenames of which we are searching for. How to do this? Sorry for the misconception I am new to this.
ls
if you have filenames with spaces and/or newlines there is no way you parse the output. – Anthon Dec 9 '13 at 14:50