bash script
Posted 02-28-2011 at 06:58 AM by aydemirk
Hello All,
I am trying to give a input to one script by using an other script. For example:
................
script1.sh:
#!/bin/bash
printf "Whats your name:";
read user_name;
if [-n "$user_name"]
then
printf "Hello $user_name!";
exit 0;
else
printf "You did not enter username:\n";
exit 1;
fi
.............
script2.sh:
#!/bin/bash
bash script1.sh
#i want to answer the question here that come from script1.sh
#then script1.sh continues
.............
Could anyone has idea?
Best Regards
Aydemir
I am trying to give a input to one script by using an other script. For example:
................
script1.sh:
#!/bin/bash
printf "Whats your name:";
read user_name;
if [-n "$user_name"]
then
printf "Hello $user_name!";
exit 0;
else
printf "You did not enter username:\n";
exit 1;
fi
.............
script2.sh:
#!/bin/bash
bash script1.sh
#i want to answer the question here that come from script1.sh
#then script1.sh continues
.............
Could anyone has idea?
Best Regards
Aydemir
Total Comments 0