Changes between Version 17 and Version 18 of YM_Course_2009/Lab4


Ignore:
Timestamp:
Jul 4, 2009, 4:44:13 PM (15 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • YM_Course_2009/Lab4

    v17 v18  
    210210echo "Enter a filename: "
    211211read filename
    212 if [ ! –r "$filename" ]
     212if [ ! -r "\$filename" ]
    213213 then
    214214   echo "File is not read-able"
     
    224224#! /bin/bash
    225225
    226 if [ $# -lt 1 ]; then
     226if [ \$# -lt 1 ]; then
    227227        echo "Usage: filetest filename"
    228228        exit 1
    229229fi
    230 if [[ ! -f "$1" || ! -r "$1" || ! -w "$1" ]]
     230if [[ ! -f "\$1" || ! -r "\$1" || ! -w "\$1" ]]
    231231then
    232   echo "File $1 is not accessible"
     232  echo "File \$1 is not accessible"
    233233  exit 1
    234234fi