|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I want to automate pbrun command in one of my project but the problem is when i am running pbrun command then it is asking for some input as identification no.I redirect that number through a file but it's not working. I didn't got any option for that to pass it as command line.Is there any way to pass it so that i should not be forced it to pass as manually.If any one has any idea plz help.... |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
echo "YES" | Passyes.sh
|
| Sponsored Links | ||
|
|
|
#3
|
||||
|
||||
|
If the above does not work then try using expect(1); Code:
#!/usr/local/bin/expect -f spawn pbrun $argv expect "question" send "answer\r" Replace the "question" string with what pbrun says, replace "answer" with your desired response. |
|
#4
|
|||
|
|||
|
Hi,
The first solution that u provided will work for normal scripts but not for pbrun command.Second one is right but i don't want to use expect.any other solution |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
If the questions and answers are always in the same order and the programme you are using supports it then you can use heretext, e.g.: Code:
pbrun << EEOOFF yes no 1 fred EEOOFF |
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
Another solution posted here: http://www.unix.com/shell-programmin...#post302290616
I'm not sure about the security implications in using this method. |
| Sponsored Links | ||
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with /usr/bin/cd command | raghu.amilineni | Shell Programming and Scripting | 5 | 03-03-2009 08:17 PM |
| Exit Shell Prompt after Pbrun | ishanc | Shell Programming and Scripting | 4 | 02-25-2009 10:11 AM |
| problem with output of find command being input to basename command... | new_learner | UNIX for Dummies Questions & Answers | 2 | 12-14-2008 01:56 AM |
| where is the problem in my sed command.... | P_W | UNIX for Dummies Questions & Answers | 5 | 04-20-2007 09:48 PM |
| problem with dd command or maybe AFS problem | Anta | Shell Programming and Scripting | 0 | 08-25-2006 10:10 AM |
|
|