Bash script for Append text in a file
#! /bin/bash
echo -e "enter your file name : \c "
read file_var
if [ -f $file_var ]
then
if [ -w $file_var ]
then
echo " type some txt to add and then ctl d to exit "
cat >> $file_var
else
echo " file have no permission "
fi
else
echo " $file_var not avaialbe"
fi


Comments
Post a Comment