Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [ "$#" -lt 2 ]; then
- echo "za malo argumentow"
- exit 1
- fi
- if [[ $1 =~ ^[0-9]{3}$ ]]; then
- echo "uprawnienia ok"
- else
- echo "pierwszy argument nie jest liczbowy"
- exit 1
- fi
- for file in "${@:2}" ; do
- if [ -f "$file" ]; then
- chmod $1 $file
- continue
- else
- echo "nie wsyzstkie rzeczy są plikami"
- exit 1
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement