- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: shell script challenge regarding background/pr...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-18-2003 02:26 AM
тАО12-18-2003 02:26 AM
Re: shell script challenge regarding background/prompt/pipe
Unless you know which fd this is, or have the patience to keep trying
nohup EXECUTABLE 3nohup EXECUTABLE 4
etc up to 20,
then I'd give up if I were you...
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-18-2003 09:44 PM
тАО12-18-2003 09:44 PM
Re: shell script challenge regarding background/prompt/pipe
mkfifo fifo
nohup EXECUTABLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-18-2003 09:49 PM
тАО12-18-2003 09:49 PM
Re: shell script challenge regarding background/prompt/pipe
i think
echo > fifo
would be better than
echo "^M" >fifo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2003 12:35 AM
тАО12-19-2003 12:35 AM
Re: shell script challenge regarding background/prompt/pipe
How about posting this script so that we can have a look at it?
JL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2003 01:12 AM
тАО12-19-2003 01:12 AM
Re: shell script challenge regarding background/prompt/pipe
Thanks everyone, but I think I'll just have to use cron to restart this bit and keep it out of Omniback post-exec alltogether.
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2003 01:51 AM
тАО12-19-2003 01:51 AM
SolutionIf you are just trying to answer a prompt that the application requires, and it's a carriage return, I've done it as such:
echo "\013" | APPLICATION > /dev/null 2>&1 &
This works for me in a script that runs an Informix backup procedure, which is normally interactive.
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2003 02:03 AM
тАО12-19-2003 02:03 AM
Re: shell script challenge regarding background/prompt/pipe
cheers Mark!
(I can always count on ITRC Geniuses)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-19-2003 03:09 AM
тАО12-19-2003 03:09 AM
Re: shell script challenge regarding background/prompt/pipe
I just want to say I enjoyed reading this puzzle...
We need more posts like this to test our brains power.
I personally troll the boards to educate myself... and posts like this are helping.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2003 11:43 PM
тАО12-22-2003 11:43 PM
Re: shell script challenge regarding background/prompt/pipe
1st: You start the background job:
bgjob 2>&1 1>logfile |&
2nd: You retrieve the background job's stderr output (error messages, prompts, etc.):
read -p $bg_output
3rd: You send data to the background job's stdin:
bg_input="some_input"
print -p -R $bg_input
This works with POSIX-compatible shells, e.g., /usr/bin/sh and /usr/bin/ksh, but not with bash.
I hope this is useful for you.
- « Previous
-
- 1
- 2
- Next »