13

Help with recursive command

view full story
linux-howto

http://www.unix.com – Hi, I need help with recursive function. This is not a part of any homework or classroom related. I am trying to learn unix and working on a question posted on site. basically i have to create a script which does what rm -r does. my code so far: Code:   1 #!/bin/bash   2   3 function recursive () {   4 if ! [ "$(ls -A "$1" )" ]   5 then   6      mv -f $1 ~/deleted   7 else   8            cd $1   9            local files=$(ls -A)  10  &nbs (HowTos)