Suppressing Error Message is not working

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Suppressing Error Message is not working
# 1  
Old 09-28-2010
Suppressing Error Message is not working

I need to suppress the error message for commands. I have given the command like below

lsb_release -dr 2>/dev/null

But it is not working.

Am testing with Red Hat Linux release 9. Guide me.

Thanks in advance
# 2  
Old 09-28-2010
what does this show?
Code:
strace -e=open,dup,dup2  lsb_release

It could be that something is causing stderr to be other than file descriptor 2. I'm assuming you did not previously redirect stderr with exec:
Code:
exec 2>&4

# 3  
Old 09-28-2010
If you're using a raw console, it may be these are messages from the system logger and not merely printed by your process.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Suppressing errors from command output

Hi, When I run the command "print_manifest | grep "Main Memory", I get the note : # /opt/ignite/bin/print_manifest | grep "Main Memory" NOTE: Could not read the /etc/resolv.conf file. Main Memory: 196498 MB # How do I suppress the part : NOTE: Could not read the... (4 Replies)
Discussion started by: anaigini45
4 Replies

2. UNIX and Linux Applications

Firefox Warning message for closing with multiple tabs not working

Can anyone explain why firefox warning message for closing with multiple tabs not working. The checkbox for warning when you have multiple tabs is checked so I don't understand why its not working. (0 Replies)
Discussion started by: cokedude
0 Replies

3. Shell Programming and Scripting

Suppressing the terminated message from pkill & killall commands in a bash script

Hi all, I've been pulling my hair out with this problem for 3 days:wall: now without success any help would be massively appreciated. Basically the script is used to shutdown a rails server so a new IP address can be assigned, the shutdown part is taken care of in function_one using the... (2 Replies)
Discussion started by: danmc
2 Replies

4. Shell Programming and Scripting

Suppressing a message from being displayed

I have a script which checks for *.txt files in a particular directory and if no files were found then it goes into sleep for 10 secs and looks back for files again and if any files were found then the script does some processing with the files found, which is my requirement too. FILE_EXISTS=`ls... (5 Replies)
Discussion started by: vpv0002
5 Replies

5. Shell Programming and Scripting

Suppressing space replacing by comma

hi i want to replace spaces by comma my file is ADD 16428 170 160 3 WNPG 204 941 No 204802 ADD 16428 170 160 3 WNPG 204 941 No 204803 ADD 16428 170 160 3 WNPG 204 941 No 204804 ADD... (9 Replies)
Discussion started by: raghavendra.cse
9 Replies

6. UNIX for Dummies Questions & Answers

suppressing an error message using the "ls" command

hi I'm new here so my question maybe be retarded or out of place: Is there a way to suppress the "No such file or directory" error message when using the "ls" command ? thanks (5 Replies)
Discussion started by: basher400
5 Replies

7. UNIX for Dummies Questions & Answers

echo is suppressing multiple spaces.How to avoid it

I am reading a file and copying selected lines from the file into another using echo. For eg: while read line do if ((some logic to determine whether I need to copy the current line to another file)) then echo $line > tempfile fi done<srcfile The problem I have is the data in the file... (1 Reply)
Discussion started by: prathima
1 Replies

8. UNIX for Dummies Questions & Answers

Suppressing output to the screen

I want to check whether the variable read from the console is number or character , so i used echo $option|grep and checked the reuslt returned by grep cmd using $? But since I use echo the value is getting printed in the screen , I want to supress the o/p. Can anyone suggest how this can be... (1 Reply)
Discussion started by: rolex.mp
1 Replies

9. Shell Programming and Scripting

Suppressing one line in a file

Hello there, I am having a text file, the following is written in that text file: Full range of accounts: Account1 Account2 Account3 Account4 Now my question is. how to take that file and produce another file having only the accounts (i.e., suppressing the fist line of that... (4 Replies)
Discussion started by: charbel
4 Replies

10. Shell Programming and Scripting

suppressing keyboard input

Setup Info: This User Id and Password mention below are being used with the ISQL command to connect to a sybase database so they are likely to not be the same as those that were signed on from the session. Situation: Using a korn shell, the shell prompts for a User Id and Password. During the... (1 Reply)
Discussion started by: anthreedhr
1 Replies
Login or Register to Ask a Question