Sponsored Content
Top Forums Shell Programming and Scripting put an interactive script in background after taking input Post 302167820 by System Shock on Friday 15th of February 2008 02:31:54 PM
Old 02-15-2008
...you can append an ampersand ( & ) at the end of the comands you want run in the background
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Interactive ftp get/put

Hi All, I'm trying to get this to work but when I execute it I get the following error ./ftp_upload.sh: line 78: syntax error: unexpected end of file. This was working before I expanded the script and had the here document part directly below within a function. Can anyone spot what I've... (5 Replies)
Discussion started by: darrenm
5 Replies

2. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

3. Programming

Run interactive program in background and grep it

I need to run an interactive program in the background so I can grep it for specific data to use for some logic in a script. There is no quiet or background mode on the program so I plan to redirect a document with commands in it and then to grep the output. This is almost working, except... (1 Reply)
Discussion started by: doonan_79
1 Replies

4. Shell Programming and Scripting

Script to delete files older than x days and also taking an input for multiple paths

Hi , I am a newbie!!! I want to develop a script for deleting files older than x days from multiple paths. Now I could reach upto this piece of code which deletes files older than x days from a particular path. How do I enhance it to have an input from a .txt file or a .dat file? For eg:... (12 Replies)
Discussion started by: jhilmil
12 Replies

5. Shell Programming and Scripting

Interactive script with background

I have script, which need some variable from user and i use below command for this read this script works fine while running without background, but when i run this script in background, it ask first variable then immediately it show below error KSH variable not found please let me... (1 Reply)
Discussion started by: pallvi_mahajan
1 Replies

6. Linux

Not able to put ls -lR command in background

Hi All, i am trying to put ls -lRt command to run in the background but it fails. i continue to get output on screen and didnt get the command prompt right after i put the command in background. command i am using is ls -lRt & i am using bash. Can someone let me know how to... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

7. UNIX for Beginners Questions & Answers

Linux Console for Interactive Input Script

Hi there, How do I enter command to the interactive console. I was able to do it via the first line. What if I have more lines to input into the interactive console from line 3 onwards. Is there a more easier way? (echo -e "load openvas" ; echo -e "openvas_help") | msfconsole ... (4 Replies)
Discussion started by: alvinoo
4 Replies

8. Shell Programming and Scripting

Put currently running script into background

Hi All, Suppose I have a script and inside it I want/need to put it into background. I need the script to not react to SIGHUP signals. I tried: #!/bin/bash echo "" > test_disown mypid=$$ echo "PID=$mypid" ( kill -SIGSTOP $mypid jobs > myjobs #disown -h <job-spec> #kill -SIGCONT $mypid )... (6 Replies)
Discussion started by: JackK
6 Replies

9. Shell Programming and Scripting

Problem in taking input Shell script

I was writing a shell script, where i need to run a command through script and then take input from user and later terminate it. i am not sure how to take input in a proper format immediately after a command. example: below command line is used to import some data in to database (LDAP)... (3 Replies)
Discussion started by: Mridul17
3 Replies

10. Shell Programming and Scripting

Recording user input from interactive shell script

Hello, I want to start out by saying that I am fairly new to scripting and am looking for someone that can point me in the right direction. Basically what I need is a way to run a interactive script that will prompt users with questions weather that be yes/no or a specific answer.. I want to be... (3 Replies)
Discussion started by: shoutcast
3 Replies
nice(1) 						      General Commands Manual							   nice(1)

NAME
nice - Runs a command at a different priority SYNOPSIS
Current syntax nice [-n priority] command [argument...] Obsolescent syntax nice [-priority] command [argument...] Note The C shell has a built-in version of the nice command. If you are using the C shell, and want to guarantee that you are using the command described here, you must specify the full path /usr/bin/nice. See the csh(1) reference page for a description of the built-in command. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: nice: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Specifies how the system scheduling priority of the executed utility is adjusted. The priority argument is a positive or negative decimal integer. Positive priority values cause a lower or unchanged system scheduling priority. Negative priority values might require appropriate privileges and cause a higher or unchanged system scheduling priority. Specifies how the system scheduling priority of the executed utility is adjusted. (Obsolescent) OPERANDS
The name of a utility that is to be invoked. Any string to be supplied as an argument to the utility named by the command operand. DESCRIPTION
The nice command lets you run the specified command at a lower priority. The value of priority can range from 1 to 19, with 19 being the lowest priority. The default value of priority is 10. [Tru64 UNIX] If you have superuser authority, you can run commands at a higher priority by specifying priority as a negative number; for example, -10. NOTES
The csh command contains a built-in subcommand named nice. The command and subcommand do not necessarily work the same way. For informa- tion on the subcommand, see the csh command. EXIT STATUS
The nice command returns the following exit values: An error occurred in the nice utility. The specified command was found but could not be invoked. The specified command could not be found. EXAMPLES
To run a low priority command in the background, enter: nice cc -c *.c & This runs the command cc -c *.c at low priority in the background. Your terminal is free so that you can run other commands while cc is running. See the sh command for details about starting background processes with an & (ampersand). To specify a very low prior- ity, enter: nice -n 15 cc -c *.c & This runs cc in the background at a priority that is even lower than the default priority set by nice. To specify a very high pri- ority (ksh and sh only), enter: nice -n -10 wall <<end System shutdown in 2 minutes! end This runs wall at a higher priority than all user processes. Doing this slows down everything else running on the system. If you do not have superuser authority when you run this command, then the wall command runs at the normal priority. The <<end and end arguments define a Here Document, which uses the text entered before the end line as standard input for the com- mand. For more details, see the Inline Input (Here) Documents section on the sh(1) reference page. ENVIRONMENT VARIABLES
The following environment variables affect the execution of nice: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. Determines the search path used to locate the command invoked. SEE ALSO
Commands: csh(1), nohup(1), renice(8) Functions: nice(3), setpriority(2) Standards: standards(5) nice(1)
All times are GMT -4. The time now is 07:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy