-->

Scripts to find one file and append data to it

Posted by Admin on
#This scripts find one file in current directory and append data to it

if [ -f $1 ]
then
    if [ -w $1 ]     # -w option is used to write permission
    then
    echo "Write in the file, whatever you want"
    cat >> $1    #double less than opertar is used to input in the file
    else
    echo "You dont have write permission"
    fi
else
echo "File not found"
fi

No comments:

Post a Comment