Sponsored Content
Top Forums Shell Programming and Scripting Saving nohup output to a file other than nohup.out Post 302878491 by kraljic on Friday 6th of December 2013 10:36:27 AM
Old 12-06-2013
Thank you Cero, RudiC

Cero's (and RudiC's) solution has worked
Code:
nohup test.sh > MyOutput.log 2>&1 </dev/null &

But I didn't quite understand how 'redirecting stdin from /dev/null' work.

Regarding commands to accept Standard Input: I've only used things like below in my career.
sort < unsorted_names_list.txt

And I have only bit bucket /dev/null to discard errors like below.
find / -name "HelloWorld" 2>/dev/null

Can you explain how redirecting stdin from /dev/null got rid of the error ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

capture nohup log file

Hi, I am running my script using nohup, but I am not able to capture the log file for that process could naybody please help... Here is what I am doing.... nohup ./script & 1>/home/user1/log.txt but I am not able to capture the log.....Is there anyother way I can capture the log... (2 Replies)
Discussion started by: mgirinath
2 Replies

2. UNIX for Dummies Questions & Answers

I want to copy the text output from a 'nohup.out' file.

Hello, I have a nohup.out file that, when executed, outputs a spreadsheet file with four-to-seven columns of number. I want to copy this output (in its entirety), so that I could then paste it on excel@ , or Notepad@. Please help, thanks. (3 Replies)
Discussion started by: Iamthe great
3 Replies

3. UNIX for Dummies Questions & Answers

Route the logs to different file other than nohup.out

Hi guys Right now the standard out and standard err are going to nohup.out file I wanted to route to some other name specific files so that it will be easy to research the logs Example I have this line in my script nohup execute receiptLoaderStart & which is routing the logs to... (6 Replies)
Discussion started by: pinky
6 Replies

4. Shell Programming and Scripting

output nohup file containg the PID

Hi to everybody. Is it possible to nohup a process and redirect the output to a file containing the PID? E.g. if nohup filename > out.nohup associate the PID=8074 to filename, is it possible to call the output file something like out_8074.nohup instead of out.nohup? By this way it would... (0 Replies)
Discussion started by: plsrn
0 Replies

5. Shell Programming and Scripting

nohup output on screen for some time

Hi, I'm executing a binary with nohup in a menu(shellscript) and output is going to nohup.out fine. I need few lines of nohup.out should be displayed on screen so that I will come to know the process is successfully started and continue with other options in my menu. Thanks in advance. (3 Replies)
Discussion started by: axes
3 Replies

6. Shell Programming and Scripting

extending the line length of nohup output

Hi I'm backgrounding matlab jobs using nohup. My foreground programs are written for an xterm that has 132 columns. When I use nohup and redirect the output to nohup.out, the default appears to be something like 72 columns, which breaks up my formatted screen output from matlab commands... (1 Reply)
Discussion started by: LeoSimon
1 Replies

7. UNIX for Dummies Questions & Answers

How to grep string from nohup.out file

Hi, I have one shell script, which run another one script inside in nohup mode. I want to search one string from the nohyup.out file in the same mail shell script itself .Can anyone help me?? Please find the code below: total_ear=`cd ear ; ls *.ear | wc -l | tr -d ' '` for ear in `cd ear ; ls... (0 Replies)
Discussion started by: ckchelladurai
0 Replies

8. Shell Programming and Scripting

grep from the nohup.out file

Hi, I have one shell script, which run another one script inside in nohup mode. I want to search one string from the nohup.out file in the same shell script itself .Can anyone help me?? Please find the code below: total_ear=`cd ear ; ls *.ear | wc -l | tr -d ' '` for ear in `cd ear ; ls... (1 Reply)
Discussion started by: ckchelladurai
1 Replies

9. UNIX for Dummies Questions & Answers

How do I send output of a background process to a file other than nohup.out?

I have a question. I will be running a background process using nohup and & command at end. I want to send output to a file say myprocess.out. So will this command work? nohup myprocess.ksh > myprocess.out & Thanks in advance guys !!! :) (3 Replies)
Discussion started by: vx04
3 Replies

10. Shell Programming and Scripting

Nohup not give expected output. Non-stop running process

Hello, I am trying to make a bash script, I tested nohup but it did not help me. My code is: ffmpeg -i $input_url -c:v copy -c:a copy -listen 1 -f mpegts http://localhost:port/live/test When I open it in VLC, it starts feeding my screen and I see bitrate values. When I stop watching it,... (4 Replies)
Discussion started by: baris35
4 Replies
pipebench(1)															      pipebench(1)

NAME
pipebench - Shows speed of stdin/stdout communication SYNOPSIS
pipebench [ -ehqQIoru ] [ -s file | -S file ] [ -b bufsize ] DESCRIPTION
Measures the speed of stdin/stdout communication. OPTIONS
-h Displays a help message and exits. -e If an error occurs, exit (breaking the pipe between stdin and stdout. By default an error message is printed to stderr and the pro- gram continues. -q Only show summary stats. -Q Don't show running speed or summary stats. Same as -q -o. Can be used to play with buffer size. -o Don't show summary. -b bufsize Use this buffer size, in bytes. -r Just show raw speed, no fancy stuff. And no summary. -s file Write status to file instead of stderr. -S file Write status to file instead of stderr. -I Use 1kB = 1000B, instead of the default 1024B. -u Don't convet to units (kilo, Mega, etc...) EXAMPLES
Benchmark and show progress of backup # (cd /home/; tar cf - .) | pipebench | (cd /mnt/backup/; tar xf -) A number to brag to your friends about $ dd if=/dev/zero bs=80k count=60k 2> /dev/null | ./pipebench -q > /dev/null BUGS
No known bugs... yet. SEE ALSO
dd(1), cat(1) AUTHOR
Pipebench was written by Thomas Habets <thomas@habets.pp.se> pipebench 18th Apr, 2003 pipebench(1)
All times are GMT -4. The time now is 05:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy