Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ $# -ne 2 ]; then
- echo "Usage: $0 <dir> <char>"
- exit 1
- fi
- dir=$1
- char=$2
- if [ ! -d $dir ]; then
- echo "$dir isn't a dir"
- exit 1
- fi
- list=$(find $dir -type f -name *.txt)
- for file in $list
- do
- chmod a+$char $file
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement