Sponsored Content
Full Discussion: Nohup immediately stops.
Operating Systems Solaris Nohup immediately stops. Post 302810877 by Yoda on Wednesday 22nd of May 2013 04:14:27 PM
Old 05-22-2013
First of all don't use this approach: for i in `cat /home/xxxxx/Allservers.txt`. It is Useless Use of backticks.

Use while loop instead. Also use -n option with ssh to prevent it reading from stdin:
Code:
#!/bin/sh

rm backup.out
while read host
do
        echo "Logging onto $host"
        ssh -qtn $host '/usr/local/bin/sudo "/src/bkupsa"'
done < /home/xxxxx/Allservers.txt > backup.out

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a Shell Program immediately

Hi Friends, I need a simple shell script(Linux..bash shell) for the below description. Can anyone help me please. I need it very urgently. That is why i cannot write it myself. Objective Create shell scripts using: · Simple interactive menus · Variables, functions Description Create a... (4 Replies)
Discussion started by: praji
4 Replies

2. AIX

UIDs being overwritten immediately

We have a problem where we delete a user and their associated UID gets dumped back in the UID pool. The if we immediately create a another (new) user, AIX reuses the last UID, the one that was just released. This is causing a problem when reports are being generated because the new users name is... (2 Replies)
Discussion started by: xsys2000
2 Replies

3. UNIX for Dummies Questions & Answers

I need help immediately. Please help me

Hi Everyone, I am writing a script, in that i want to find out whether my disk space usage capacity extends more than 98%. If my disk space capacity extends more than 98% i want to print that the space capacity is running out of space otherwise i want to print only the capacity of the space... (4 Replies)
Discussion started by: Sheethal
4 Replies

4. Shell Programming and Scripting

Please respond immediately

Hi ..please tell me how to modinfy an existing file in a directory, i need commands like to open edit and save n execute the file in BASH. please respond immediately (3 Replies)
Discussion started by: deepti.1104
3 Replies

5. Linux

please help immediately

how can i check if the size of my file is greater than 5MB and if it is so then how can I direct my data to another new file. the data will be in the form of SQL query (4 Replies)
Discussion started by: infyanurag
4 Replies

6. Programming

Experts !!! I Need HELP immediately..!

HI, I am getting the error : ErrCode:-2 Message:Application Initialisation function Err Params:Could not Load SO/DLL Nothing specific is coming, just the above error. Can anyone tell me how to debug this error. Thanks. (3 Replies)
Discussion started by: amol_helwatkar
3 Replies

7. Shell Programming and Scripting

please tell immediately

what is the script to take files from ftp to unix server and unzipped the files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

8. Shell Programming and Scripting

'script' command exits immediately

I'm trying to capture the output of some commands with the 'script' utility. Normally, I would type 'script /path/to/output/file', then enter commands, then hit ctrl+D to end the 'script' capture. I'm having trouble with it on a server. Upon starting 'script', it exits immediately before I type... (6 Replies)
Discussion started by: jalburger
6 Replies

9. Shell Programming and Scripting

Saving nohup output to a file other than nohup.out

Shell : bash OS : Oracle Linux 6.4 I want to save the ouput of a nohup command to file other than nohup.out . Below are my 3 attempts. For both Attempt1 and Attempt2 , the redirection logs the output correctly to the output file. But I get the error "ignoring input and redirecting stderr to... (7 Replies)
Discussion started by: kraljic
7 Replies
NICE(1) 						      General Commands Manual							   NICE(1)

NAME
nice, nohup - run a command at low priority (sh only) SYNOPSIS
nice [ -number ] command [ arguments ] nohup command [ arguments ] DESCRIPTION
Nice executes command with low scheduling priority. If the number argument is present, the priority is incremented (higher numbers mean lower priorities) by that amount up to a limit of 20. The default number is 10. The super-user may run commands with priority higher than normal by using a negative priority, e.g. `--10'. Nohup executes command immune to hangup and terminate signals from the controlling terminal. The priority is incremented by 5. Nohup should be invoked from the shell with `&' in order to prevent it from responding to interrupts by or stealing the input from the next per- son who logs in on the same terminal. FILES
nohup.out standard output and standard error file under nohup SEE ALSO
csh(1), setpriority(2), renice(8) DIAGNOSTICS
Nice returns the exit status of the subject command. BUGS
Nice and nohup are particular to sh(1). If you use csh(1), then commands executed with ``&'' are automatically immune to hangup signals while in the background. There is a builtin command nohup which provides immunity from terminate, but it does not redirect output to nohup.out. Nice is built into csh(1) with a slightly different syntax than described here. The form ``nice +10'' nices to positive nice, and ``nice -10'' can be used by the super-user to give a process more of the processor. 4th Berkeley Distribution May 8, 1986 NICE(1)
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy