Shell Scripting Tutorial for Beginners 7 - How to append output to the e...



#! /bin/bash

echo -e "Enter the name of the file : \c"
read file_name

if [ -f $file_name ]
then
if [ -w $file_name ]
then
echo "Type some text data. To quit press ctrl+d."
cat >> $file_name
else
echo "The file do not have write permissions"
fi
else
echo "$file_name not exists"
fi

Comments

Popular posts from this blog

Download Aplikasi Cuti Online Menggunakan Laravel

How to Convert from binary to hex in java