i have a question, can help me?
Write a script that will do ls -l command on each of its arguments only if the argument is the name of regular file. This script will have a for loop, and inside the loop will an if test that uses one of the file test options.
Script's name: listfiles.sh
Presume you have files named xyz and abc, and a directory named mydir. If you runs the script:
./listfiles.sh xyz mydir abc nosuchfile
You will get ouput like this, since xyz and abc are the only two regular files:
-rw-r--r-- 1 LinuxBox users 1234 2010-09-11 12:34 xyz
-rw-r-xrw- 1 LinuxBox users 2234 2010-09-09 12:35 abc