LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-07-2013, 12:51 AM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
How to disable the error message


I have a script use grep to sort the file content , after run this script , it pops the below error message , but It still can export the correct result, therefore , I just would like not displaying this error message , how to do it ? thanks


Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
There are lines with both 111 and
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
 
Old 10-07-2013, 01:45 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,349

Rep: Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747Reputation: 2747
I suggest you to find that error instead of suppressing the error message. you can try grep -s .... or grep .... 2>/dev/null.
 
  


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
How to disable or hide error page (message)? megaweak Linux - Newbie 4 11-21-2012 12:03 AM
How can I disable all error message from 'gcc' command crimsonman Programming 6 04-03-2012 08:48 PM
Disable the error message pop to screen ust Linux - Distributions 1 04-15-2005 07:30 AM
Disable error message juno Linux - General 1 09-25-2002 01:45 AM


All times are GMT -5. The time now is 03:18 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration