This post is more than 5 years old
194 Posts
0
369
April 2nd, 2008 10:00
Running scanner from a script - getting it to accept input
Environment: Red Hat Linux ES V3, NetWroker V7.3.2 Build 399
I'm writting a script in ksh to verify tapes using scanner. Sometimes the scan of a tape ends with the prompt:
scanner: when next volume is ready, enter device name (or `q' to quit) [/dev/nst0]?
I want to provide the reply from within the script which will always be 'q'.
In ksh you specifiy this with what is known as a 'here document' by using '<<'. The command looks like this:
# /usr/sbin/scanner -s -ni /dev/nst0 <<++EOT++
q
++EOT++
I've used this method many times in other scripts for other applications. With scanner it still prompts me for a response. So it appears scanner it prompting for response in some non-standard way. Anyone deal with this before and know the answer?
Thanks,
Vic
I'm writting a script in ksh to verify tapes using scanner. Sometimes the scan of a tape ends with the prompt:
scanner: when next volume is ready, enter device name (or `q' to quit) [/dev/nst0]?
I want to provide the reply from within the script which will always be 'q'.
In ksh you specifiy this with what is known as a 'here document' by using '<<'. The command looks like this:
# /usr/sbin/scanner -s -ni /dev/nst0 <<++EOT++
q
++EOT++
I've used this method many times in other scripts for other applications. With scanner it still prompts me for a response. So it appears scanner it prompting for response in some non-standard way. Anyone deal with this before and know the answer?
Thanks,
Vic
No Events found!


ble1
6 Operator
•
14.4K Posts
•
56.2K Points
0
April 4th, 2008 03:00
vsemaska
194 Posts
0
April 4th, 2008 05:00
Somehow I missed that one.
Vic