I wrote the following program in my linux bashrc
open()
{
echo enter file name
read fname
locate $fname> /home/vvajendla/Desktop/backup/loc;
cat loc
exec < /home/vvajendla/Desktop/backup/loc;
value=0
while read line
do
value=`expr $value + 1`;
echo $value
echo $line
if [ $value -le 6 ]
then
gedit $line;
else
echo too many files to open
fi
done
}
The above function searches all the directories for the file-string match and opens them using GEDIT if they are less than or equal to 6.
whenever i run this function in the terminal,it gets closed. Can you please tell me what i can do to keep it open?