Solved

User Response for a background script

Posted on 2002-06-14
2
199 Views
Last Modified: 2010-04-21
Hi!

I have put a script in background mode but the script needs a user response how do I provide it
Example..

BuildPoints.sh > Bld.out&

but the BuildPoints.sh requires a user input


If the above script is running already is there any way to input the user inputs without aborting
0
Comment
Question by:sram
2 Comments
 

Accepted Solution

by:
jvras earned 200 total points
Comment Utility
It can be done like :

  /usr/username/BuildPoints.sh 2>&1

jvras
0
 
LVL 20

Expert Comment

by:tfewster
Comment Utility
From `man ksh`:
If a command is followed by & and job control is inactive, the default standard input for the command is the empty file /dev/null.

You can bring the job into foreground (`fg` or `jobs`)when you think it is ready for input, supply the input, then do Ctrl-Z and `bg` to continue it in the background. I

jvras's suggestion redirects error messages to the same device as standard output, which may not be appropriate for this task.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now