LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > aydemirk
User Name
Password

Notices


Rate this Entry

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
Posted in Uncategorized
Views 582 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 01:23 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration