I wanted to print only the name of files of a specific directory: In this way it works:
ls -g --sort=size -r /bin | awk '{print $8,$9,$10,$11,$12,$13}'
but if I read the path variable it doesn't work:
read PATH
ls -g --sort=size -r $(PATH) | awk '{print $8,$9,$10,$11,$12,$13}'
Command 'awk' is available in '/usr/bin/awk'
See Question&Answers more detail:os