SHARE
TWEET

Untitled

a guest Sep 30th, 2017 359 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function rm
  2. {
  3.         #on vire les options
  4.         count=0
  5.         for a in "$@"
  6.         do
  7.                 echo $a|grep '^-' >/dev/null
  8.                 if [ "$?" != "0" ]
  9.                 then
  10.                         ((count+=1))
  11.                 fi
  12.         done
  13.         if (( count > 1 ))
  14.         then
  15.                 echo -n "/bin/rm: $@ ?"
  16.                 read reply
  17.                 if [ "$reply" == "y" ]
  18.                 then
  19.                         /bin/rm -i "$@"
  20.                 fi
  21.         else
  22.                 /bin/rm -i "$@"
  23.         fi
  24.  
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top