[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

User Response for a background script

Posted on 2002-06-14
2
Medium Priority
?
212 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

649 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