SHARE
TWEET

Untitled

a guest Dec 15th, 2018 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if [ "$#" -lt 2 ]; then
  2.         echo "za malo argumentow"
  3.         exit 1
  4. fi
  5. if [[ $1 =~ ^[0-9]{3}$ ]]; then
  6.         echo "uprawnienia ok"
  7. else
  8.         echo "pierwszy argument nie jest liczbowy"
  9.         exit 1
  10. fi
  11. for file in "${@:2}" ; do
  12.         if [ -f "$file" ]; then
  13.                 chmod $1 $file
  14.                 continue
  15.         else
  16.                 echo "nie wsyzstkie rzeczy są plikami"
  17.                 exit 1
  18.  
  19.                 fi
  20. done
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