Link to home
Start Free TrialLog in
Avatar of sram
sram

asked on

User Response for a background script

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
ASKER CERTIFIED SOLUTION
Avatar of jvras
jvras

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.