Ques 1: Write shell script for the following
It should display menu for following
Display file contents with line number
display the file contents with page break
echo "\n Enter your choice
\n1)show file content with line number
2) show file content with pagebreak\n
case "$choice" in
1)echo "enter the file name";read fname;cat -b $fname;;
2)echo "enter the file name";read fname;cat $fname | more;;
Quest 2:Write a shell script for accepting the following information and storing in file.i) customer nameii) item descriptioniii) quantityiv) ratethe user should get the facility to enter as many record as he wants.
echo "enter the file name:\c"
while [ "$ans" = "y" ]
echo "Enter\n customer name |item description| quantity| rate:\c" >/dev/tty
read cname itemd quant rate
echo "$cname|$itemd|$quant|rate" >> $fname
echo "record inserted successfully:\c"
echo "do you want to continue:(y/n)"
case "$c" in
*) ans=y ;;