Unix <return> command in script
Guys,
does anyone know if it is possible to tell a linux script to do a <return key> function?
for eg.....
./bin/myscript.s
<return>
Andy
does anyone know if it is possible to tell a linux script to do a <return key> function?
for eg.....
./bin/myscript.s
<return>
Andy
Steve,
The myscript.s is calling an imaging program which in turn is re-imaging the pc but when it has finished it is dropping out and asking for a proxy ip address and press return. Once the user presses <return> it finishes.
And You're right I forgot to put the #!/bin/sh at the beginning of it - durrr!
Andy
The myscript.s is calling an imaging program which in turn is re-imaging the pc but when it has finished it is dropping out and asking for a proxy ip address and press return. Once the user presses <return> it finishes.
And You're right I forgot to put the #!/bin/sh at the beginning of it - durrr!

Andy
Ah,
you want an expect script...
Expect - Wikipedia, the free encyclopedia
or
Expect - Expect - Home Page
Really useful for automating interactive stuff..
you want an expect script...
Expect - Wikipedia, the free encyclopedia
or
Expect - Expect - Home Page
Really useful for automating interactive stuff..
...and (it's years since I've done any Unix shell scripting, so excuse me if way out).... isn't the easy way just to:
#!/bin/sh
/usr/bin/myscript.s < return.key
and then use vi or summut to create a file called 'return.key' that just contains one or more carriage-returns.
That's certainly what I used to do, or something similar, in the good 'ol days!
#!/bin/sh
/usr/bin/myscript.s < return.key
and then use vi or summut to create a file called 'return.key' that just contains one or more carriage-returns.
That's certainly what I used to do, or something similar, in the good 'ol days!
Have sorted it.... modified a settings file and gave it a duff Proxy IP Address.
It's a SUSE Linux boot CD that we're making to re-image a users laptop.
Cheers for the replies
Andy
It's a SUSE Linux boot CD that we're making to re-image a users laptop.
Cheers for the replies

Andy
Thread
Thread Starter
Forum
Replies
Last Post




