
Solved!
Go to SolutionRunning 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
Responses (2)
Solutions (0)

ble1
6 Operator
•
14354 Posts
•
56186 Points
123
0
Posted April 4th, 2008 03:00