15 Program - WASS to accept 10 names and stores in a file called NAME.DBF
Page 1 of 1
15 Program - WASS to accept 10 names and stores in a file called NAME.DBF
#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
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
Similar topics
» 32. WASS to accept 2 file names if both exits and not empty then concatenate both and store the content in a file called merged.txt
» 39. WASS which accept a file name and print last 10 lines of the file
» 7. WASS to accept a file name and convert its content to uppercase
» 8. WASS to accept 2 x and y , and find the XY ( x raised to the power y )
» WASS to accept a string from the user and display number of vowels
» 39. WASS which accept a file name and print last 10 lines of the file
» 7. WASS to accept a file name and convert its content to uppercase
» 8. WASS to accept 2 x and y , and find the XY ( x raised to the power y )
» WASS to accept a string from the user and display number of vowels
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum