LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-16-2003, 06:30 PM   #1
brian0918
Member
 
Registered: Apr 2003
Posts: 87

Rep: Reputation: 15
bash scripting - suppress error messages?


I've got a bash script file that runs fine, but since I haven't taken into account all possibilites, error messages like:

ls: BLEH*: No such file or directory

appear in the output sometimes.

Is there any way to suppress these error messages?
 
Old 06-16-2003, 07:25 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,118
Blog Entries: 54

Rep: Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786Reputation: 2786
You answered your question yourself: "haven't taken into account all possibilites" which roughly translates to bereaving yourself of the Fine Art of Globbing. If you don't want to increase your globbing mana, just do "cmd 2>/dev/null" and suddenly, all your troubles will seem so far awaaay, doesn't look like they're here to stay, Oh, you believe in yeh-stuh-daaay. You believe in yeh-stuh-daaay.

Hmm. Now where did that come from...
 
Old 06-19-2003, 11:16 AM   #3
brian0918
Member
 
Registered: Apr 2003
Posts: 87

Original Poster
Rep: Reputation: 15
Thanks, it works.

Last edited by brian0918; 06-19-2003 at 11:47 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH scripting I/O redirection error blinux1 Programming 13 03-18-2008 08:21 PM
Bash scripting (hide sterr messages) Quantum0726 Programming 2 06-07-2005 08:05 PM
Redirecting error messages to stderr and file in Bash lowpro2k3 Programming 1 04-14-2005 06:47 PM
BASH scripting error Darklight451 Linux - General 4 11-22-2004 03:59 PM
suppress warning messages h/w Programming 2 10-07-2003 02:56 PM


All times are GMT -5. The time now is 05:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration