Changes between Version 17 and Version 18 of YM_Course_2009/Lab4
- Timestamp:
- Jul 4, 2009, 4:44:13 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
YM_Course_2009/Lab4
v17 v18 210 210 echo "Enter a filename: " 211 211 read filename 212 if [ ! –r "$filename" ]212 if [ ! -r "\$filename" ] 213 213 then 214 214 echo "File is not read-able" … … 224 224 #! /bin/bash 225 225 226 if [ $# -lt 1 ]; then226 if [ \$# -lt 1 ]; then 227 227 echo "Usage: filetest filename" 228 228 exit 1 229 229 fi 230 if [[ ! -f " $1" || ! -r "$1" || ! -w "$1" ]]230 if [[ ! -f "\$1" || ! -r "\$1" || ! -w "\$1" ]] 231 231 then 232 echo "File $1 is not accessible"232 echo "File \$1 is not accessible" 233 233 exit 1 234 234 fi