Sponsored Content
Operating Systems Solaris Redirection does not work in Solaris Post 302748577 by Scrutinizer on Wednesday 26th of December 2012 08:19:12 AM
Old 12-26-2012
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 09:54 AM..
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

Mouse can not work in Solaris 10

Dear friends, My mouse can not work in my Solaris 10 machine. The mouse itself is OK, i can use it without problems in my colleagues' Unixs. I outstationed for a few weeks, after came back, it can not work already. The cursor will float in the centre of my screen and can never move,... (1 Reply)
Discussion started by: Dunhill_Zhao
1 Replies

2. UNIX for Dummies Questions & Answers

Mouse can not work in Solaris 10

Dear frends, My mouse in Solaris 10 machine has just failed today. The mouse itself is physically Ok, I can use it in my colleagues' Unix. In my own box, the cursor is just floating in the centre of screen. Any suggestions? Any method to check / modify hardware in solaris 10? thanks! (2 Replies)
Discussion started by: Dunhill_Zhao
2 Replies

3. Shell Programming and Scripting

ls -d doesn't work on Solaris

Hello, the ls -d command to only list directories in a directory doesn't seem to work on Solaris and the man command says to use that combination: ls -d Anyone have the same problem and find a resolve? Thanks BobK (9 Replies)
Discussion started by: bobk544
9 Replies

4. Solaris

Need An Idea On How Solaris Work

PLS AM A NEWBE IN SOLARIS AND I NEED A GOOD MATERIAL ON HOW SOLARIS WORK.ie, THE INTERNAL WORKINGS OF SOLARIS. (2 Replies)
Discussion started by: dba
2 Replies

5. Filesystems, Disks and Memory

HD Controller does not Work in Solaris

Hi, I'm attempting to build a raid Z NAS using solaris, but I only have 4 sata ports on my MB, so I bought a Rosewill RC-211 PCIe controller (adds 2 sata II ports). I'm new to solaris, but I understand that to add a new drive, you first run #devfsadm, which puts the files into /dev/dsk. I... (3 Replies)
Discussion started by: ciscocbee
3 Replies

6. Solaris

grep -e doesn't work on solaris

grep -e doesn't work in Soalris. Same script with grep -e worked on AIX/HP/LINUX.. I would like to search a list of patterns on "log.txt" like ... grep -e FATAL -e ERROR log.txt I get the error message as grep: illegal option -- e Usage: grep -hblcnsviw pattern file . . . (3 Replies)
Discussion started by: jmkraja
3 Replies

7. Shell Programming and Scripting

Output redirection to exec does not work

Hello Experts, I am on Solaris 10 Due to some limitations in one of the vendor software, I am forced to output the command to exec and then run it from there. For example.. $(echo "/usr/bin/cp a.dat b.dat") # This works However, $(echo "/usr/bin/cat a.dat > c.dat") # This does not... (8 Replies)
Discussion started by: Gokul Kumar G
8 Replies

8. Solaris

solaris redirection

Hi I am using solaris 10. When running a grep command with multiple files the output is the same as the order of the input. As soon as I pipe the output to another command then it seems that standard error takes precedence, over standard output and gets sent to the pipe first. ie grep -c... (7 Replies)
Discussion started by: chronics
7 Replies

9. Shell Programming and Scripting

Domain and work groups in solaris 10

Hello all, In solaris 10 can we create domains and workgroups like Active directory in windows? If that is possible, can some one please advise the procedure.. (1 Reply)
Discussion started by: bhargav90
1 Replies

10. Shell Programming and Scripting

grep -o does not work in Solaris

I am using the code below to grep through a list of files (TEMPFILE) and look for rsync, rdist, rsh, ftp, etc. in each file. Do a count of each, and output that to a logfile. This works great in Linux, but not at all in Solaris because the EGREP -o option does not exist. Anyone have an idea... (5 Replies)
Discussion started by: nitrobass24
5 Replies
ZGREP(1)                                                      General Commands Manual                                                     ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 10:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy