Sponsored Content
Operating Systems Solaris Redirection does not work in Solaris Post 302748573 by manalisharmabe on Wednesday 26th of December 2012 08:07:47 AM
Old 12-26-2012
RedHat Redirection does not work in Solaris

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 09:16 AM.. Reason: code tags
 

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
enable(1)                                                          User Commands                                                         enable(1)

NAME
enable, disable - enable/disable LP printers SYNOPSIS
/usr/bin/enable printer... /usr/bin/disable [-c | -W] [ -r [reason]] printer... DESCRIPTION
The enable command activates printers, enabling them to print requests submitted by the lp command. enable must be run on the printer server. The disable command deactivates printers, disabling them from printing requests submitted by the lp command. By default, any requests that are currently printing on printer will be reprinted in their entirety either on printer or another member of the same class of printers. The disable command must be run on the print server. Use lpstat -p to check the status of printers. enable and disable only effect queueing on the print server's spooling system. Executing these commands from a client system will have no effect on the server. OPTIONS
The following options are supported for use with disable: -c Cancels any requests that are currently printing on printer. This option cannot be used with the -W option. If the printer is remote, the -c option will be silently ignored. -W Waits until the request currently being printed is finished before disabling printer. This option cannot be used with the -c option. If the printer is remote, the -W option will be silently ignored. -r [reason] Assigns a reason for the disabling of the printer(s). This reason applies to all printers specified. This reason is reported by lpstat -p. Enclose reason in quotes if it contains blanks. The default reason is "unknown reason" for the existing printer, and "new printer" for a printer added to the system but not yet enabled. OPERANDS
The following operand is supported for both enable and disable: printer The name of the printer to be enabled or disabled. Specify printer using atomic name. See printers.conf(4) for information regarding the naming conventions for atomic names. EXIT STATUS
The following exit values are returned: 0 Successful completion. non-zero An error occurred. FILES
/var/spool/lp/* LP print queue. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpcu | +-----------------------------+-----------------------------+ |CSI |enabled | +-----------------------------+-----------------------------+ SEE ALSO
lp(1), lpstat(1), printers.conf(4), attributes(5) SunOS 5.10 9 Sep 1996 enable(1)
All times are GMT -4. The time now is 07:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy