|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all, i have been trying to direct o/p of one command to file, but i don get any entries in file but ouptput get displayed on command prompt. I have tried many options but still , it does not work. please guide. here is the command Code:
-bash-3.00$ /usr/local/bin/sudo lpstat -p | grep -i "not-found" 2> file11 Password: Failed to get printer info for rmp_markpoint: not-found Failed to get printer info for rp_rmp_fin_tst: not-found Failed to get printer info for rp_rmp_pur_tst: not-found Failed to get printer info for rp_rmp_hr_tst: not-found Failed to get printer info for rp_rmp_muf_tst: not-found Failed to get printer info for rp_itt_rac_tst: not-found Failed to get printer info for rp_rmp_fie_7417dn: not-found I see the output diplayed but nothig goes in file11. remember "not-found" is error message. please suggest me which option will do the same. Thanks in advance. Last edited by Scrutinizer; 12-26-2012 at 08:16 AM.. Reason: code tags |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
The pipe only connects stdout not stderr.. Try: Code:
/usr/local/bin/sudo lpstat -p 2>file11 | grep ... Last edited by Scrutinizer; 12-26-2012 at 08:54 AM.. |
| The Following User Says Thank You to Scrutinizer For This Useful Post: | ||
manalisharmabe (12-26-2012) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks a LOT Scrutinizer!
It worked! |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep -o does not work in Solaris | nitrobass24 | Shell Programming and Scripting | 5 | 07-31-2012 07:43 PM |
| solaris redirection | chronics | Solaris | 7 | 06-04-2011 02:01 PM |
| Output redirection to exec does not work | Gokul Kumar G | Shell Programming and Scripting | 8 | 05-25-2010 12:11 PM |
| Need An Idea On How Solaris Work | dba | Solaris | 2 | 02-27-2008 10:55 AM |
| ls -d doesn't work on Solaris | bobk544 | Shell Programming and Scripting | 9 | 08-27-2007 10:44 AM |
|
|