1

BASH SCRIPT of LS command

view story
linux-howto

http://www.unix.com – I need help in writing a BASH SCRIPT of ls command. for example: $ ./do_ls.sh files f1.txt f2.jpeg f3.doc $ ./do_ls.sh dirs folder1 folder2 folder3 My attempt: Code: #!/bin/bash # if test $# -d file then         echo $dirs         else if test $# -f file then         echo $files         exit 1 thanks. (HowTos)