?
Solved

User Response for a background script

Posted on 2002-06-14
2
Medium Priority
?
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
jvras earned 600 total points
ID: 7077772
It can be done like :

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

jvras
0
 
LVL 21

Expert Comment

by:tfewster
ID: 7078816
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.
Suggested Courses

771 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