I am very new in shell scripting, here is a simple program to create,copy,append operation in file,but I do not know what is my error in this code
Q1.sh
echo "1.create a file\n"
echo "2.copy content of files\n"
echo "3.append files\n"
read ch
if $ch -eq 1
then
read file
cat > $file
fi
if $ch -eq 2
then
read file1 file2
cp $file1 $file2
fi
if $ch -eq 3
then
read file1 file2
cat $file1 >> $file2
fi
error When i press 1 it says 1 not found