Ah we need to pass an argument then, okay try this instead:
$1 is the first passed argument string.#/bin/bash
ls -D $1
So then to execute the shell script you would do like:
./ld.sh /root
which would list hte directory contents of /root etc.
you wont be able to save to /bin unless you do it as root (sudo on ubuntu)






Reply With Quote