> Redirect the piped information in garbage | Unix Linux Forums | Shell Programming and Scripting

  Unix/Linux Go Back    

Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Redirect the piped information in garbage

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
Old Unix and Linux 12-05-2012
urfrnddpk urfrnddpk is offline
Registered User
Join Date: Dec 2010
Last Activity: 6 December 2012, 2:27 AM EST
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
Redirect the piped information in garbage


i was trying to detect one particular type of file through my script(which is running in loop to detect the file )
so i used the follwing command

ls $PATH/*GLB*|grep CTL  > /dev/null 2>&1

but every time i am getting the message

path/*GLB* not found

i am OK with the file not found message but i do not want this message to be displayed


Last edited by Franklin52; 12-05-2012 at 07:22 AM.. Reason: Please use code tags for data and code samples
Sponsored Links
Old Unix and Linux 12-05-2012
bartus11's Unix or Linux Image
bartus11 bartus11 is offline
Moderator Emeritus
Join Date: Apr 2009
Last Activity: 28 June 2015, 6:17 PM EDT
Posts: 3,733
Thanks: 7
Thanked 1,152 Times in 1,122 Posts

ls $PATH/*GLB* 2>/dev/null |grep CTL  > /dev/null 2>&1

The Following User Says Thank You to bartus11 For This Useful Post:
urfrnddpk (12-06-2012)
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Garbage value sujit_singh Shell Programming and Scripting 3 09-30-2011 01:00 AM
strcat outputs garbage airon23bball Programming 2 05-25-2010 01:57 PM
Remove Garbage Output Danish Shakil Shell Programming and Scripting 7 08-29-2008 10:41 AM
Garbage characters in display Haleja001 UNIX for Dummies Questions & Answers 0 09-21-2005 09:24 PM

All times are GMT -4. The time now is 11:52 AM.