This is one of my homework exercise.
Write a shell program, which will take a directory as an argument. The script should then print all the regular files in the directory and all the recursive directories, with the following information n the given order for each of the files File name (full name from the specified directory) file size owner In case the directory argument is not given, the script should assume the directory to be the current working directory
I am confused about how to approach this problem. For the listing of files part, I tried
ls -R | awk ...but i was not able to do it because I was not able to find a suitable field seperator for awk. I know its unfair to ask for a solution, but please can you guys give me a hint as how to proceed with the problem? Thanks in advance.