CHRIST MCA 2009-2012
Would you like to react to this message? Create an account in a few clicks or log in to continue.

15 Program - WASS to accept 10 names and stores in a file called NAME.DBF

Go down

15 Program - WASS to accept 10 names and stores in a file called NAME.DBF Empty 15 Program - WASS to accept 10 names and stores in a file called NAME.DBF

Post  Ashish Wed Jul 21, 2010 10:13 pm

#program to accept 10 names and store it in file called stud.dbf

echo "Enter number of students to enter name of: "
read n
x="stud.dbf"
if test -f $x
then
echo " file already exists. Appending the informations"
fi
i=1
while [ $n -ne 0 ]
do
echo "Enter name $i :"
read nm
`echo $nm >> stud.dbf`
n=`expr $n - 1`
i=`expr $i + 1`
done


Ashish

Posts : 1
Join date : 2010-07-21
Location : Bangalore

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum