[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

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
0
sram
Asked:
sram
1 Solution
 
jvrasCommented:
It can be done like :

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

jvras
0
 
tfewsterCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now