suppress bash's "Done" message


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting suppress bash's "Done" message
# 1  
Old 08-30-2006
suppress bash's "Done" message

Hi,

I'm running a background job in my bash script.
But when the job quit, bash echos a message like
"[1]+ Done xterm".
This is annoying.
How can I suppress it?
# 2  
Old 08-31-2006
Can't you do it with adding this to the end of your command:

>dev/null

I am not on a UNIX box at the moment but i think it might work even with background jobs.

more info here
http://www.tldp.org/LDP/abs/html/zeros.html
# 3  
Old 08-31-2006
I do not think this will work, since that's printed by the shell, not the program. Maybye try 'program & disown' to tell the shell it shouldn't care about the program anymore.
# 4  
Old 08-31-2006
Run the background command in a sub shell and redirect the output

Code:
(
 ls &  > yourtmpfile
) > /dev/null 2>&1

# 5  
Old 08-31-2006
Don't know if this works in bash, and I don't have access to it to test, but in ksh, you would turn that off by doing
Code:
set +o monitor

# 6  
Old 08-31-2006
Try..
Code:
 echo "command" | batch

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Explaining behaviour of sudo bash "$0" "$@";

I've found this script part on the stackoverflow: if ; then sudo bash "$0" "$@"; exit "$?"; fi I realized that sudo bash "$0" "$@"; is the only needed for me. But the strange thing happens when I move this line outside the IF statement: sudo bash "$0" "$@"; stops the... (9 Replies)
Discussion started by: boqsc
9 Replies

3. UNIX for Dummies Questions & Answers

"Help with bash script" - "License Server and Patch Updates"

Hi All, I'm completely new to bash scripting and still learning my way through albeit vey slowly. I need to know where to insert my server names', my ip address numbers through out the script alas to no avail. I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Discussion started by: profileuser
25 Replies

4. UNIX for Dummies Questions & Answers

Suppress "No such file or directory" in ls

Hi In csh I like to do something like this:if ( `ls /tmp/foo*.xml | wc -l` ) echo "Files found" If no files exist I get an error "No such file or directory". I know how to get rid of this message by using( ls /tmp/foo*.xml > /dev/tty ) >& /dev/null Now I like to do something like this:if... (2 Replies)
Discussion started by: Wernfried
2 Replies

5. Shell Programming and Scripting

Suppress a background message in Bash

I'm having trouble with part of this bash script in Linux where I respawn a new instance of script and kill the old one to prevent forking (Yes, I know 'exec' will not fork but this needs to be interactive) When the old instance is kill it pops up "Terminated!" in the middle of the new instance... (7 Replies)
Discussion started by: Azrael
7 Replies

6. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. Shell Programming and Scripting

Simplify Bash Script Using "sed" Or "awk"

Input file: 2 aux003.net3.com error12 6 awn0117.net1.com error13 84 aux008 error14 29 aux001.ha.ux.isd.com error12 209 aux002.vm.ux.isd.com error34 21 alx0027.vm.net2.com error12 227 dux001.net5.com error123 22 us008.dot.net2.com error121 13 us009.net2.com error129Expected Output: 2... (4 Replies)
Discussion started by: sQew
4 Replies

9. Shell Programming and Scripting

Suppress "Where are you?" Message

biff n pdir=`pwd` # check for null parameter if ; then echo current directory $pdir ls -latr echo else p1=$1 #check for directory entry only if ; then pdir=$p1 echo current directory $pdir cd $pdir ls -latr echo #check for directory entry and file... (2 Replies)
Discussion started by: wtolentino
2 Replies

10. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question