currently I'm working on 2 code :
the first code is a code to display a menu to the user (start.sh) :
#!/bin/sh
echo choose a number :
echo "1.)display place information"
echo "2.)look for first character entered"
read number
case $number in
"1") ./script.sh;;
"2") ./script2.sh;;
esac
exit
the code for script.sh is :
#!/bin/sh
grep "$1" Place.txt
basically, when running script.sh , I need to enter 1 argument like ./script.sh home and it match the word 'home' in Place.txt.
But , when i run the "start.sh" script and choose number 1 which run "script.sh" script I have nowhere to enter the argument (home) and the "script.sh" code won't run.
any suggestion how to achieve that?
start.shand then pass it as an argument toscript.sh.read infoand./script.sh "$info".