10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I use a bash script to creating the hosts file /etc/hosts
But there is a bug inside my output and I want to fix this.
My Array looks like this:
205,IP 111.122.133.20
205,HOST2 unas
205,HOST1 unas15533
205,COMMENT # UNAS
775,IP ... (9 Replies)
Discussion started by: Marti95
9 Replies
2. Shell Programming and Scripting
Hello Unix gurus,
I have a file with this format (example values):
label1 1 0
label2 1 0
label3 0.4 0.6
label4 0.5 0.5
label5 0.1 0.9
label6 0.9 0.1
in which:
column 1 is a row label
column 2 and 3 are values
I would like to do a simple operation on this table and get the... (8 Replies)
Discussion started by: ksennin
8 Replies
3. Shell Programming and Scripting
Hi Gurus,
I have requirement to compare current result with previous reuslt.
The sample case is below.
1 job1 1
1 job2 2
1 job3 3
2 job_a1 1
2 job_a2 2
2 job_a3 3
3 job_b1 1
3 job_b2 2
for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies
4. Shell Programming and Scripting
Hi friends...I have 2 files, file1.txt and reference.txt
I could able to find difference using diff and following command
awk 'NR == FNR { A=1; next } !A' reference.txt file1.txt
above command listing data which is not in reference.txt
12.12 87
11.95 88
11.83 89
12.55 84... (12 Replies)
Discussion started by: Akshay Hegde
12 Replies
5. Shell Programming and Scripting
Hello,
I have two files A and B .A file consist of the words that user will put whereas file B consist of all user's LDAP a/c.I want here that if user don't mention LDAP a/c in comment than it will exit otherwise success.
File A.I have a solution that I will modify the file A ...just save the... (9 Replies)
Discussion started by: anuragpgtgerman
9 Replies
6. Shell Programming and Scripting
select colname from syscat.columns where tabname='t' and tableschema='s'
output is columnnames which are in part of primary key
PK1
PK2
PK3
PK4
PK5
select colname from syscat.columns where tabname ='t1' and tableschema='s'
output is columnnames which are in part of primary key for... (3 Replies)
Discussion started by: kanakaraju
3 Replies
7. Shell Programming and Scripting
Hi Everyone,
1.txt
00:01:01 asdf
00:33:33 1234
00:33:33 0987
00:33:33 12
00:33:33 444
2.txt
vvvv|ee
444|dd33|ee
dddd|ee
12|ee
3ciur|fdd
the output should be: (6 Replies)
Discussion started by: jimmy_y
6 Replies
8. UNIX for Dummies Questions & Answers
Hi.
If we have this file
A B C
7 8 9
1 2 10
and this other file
A C D F
7 9 2 3
9 2 3 4
The result i´m looking for is intersection with A B C D F
so the answer here will be (10 Replies)
Discussion started by: alcalina
10 Replies
9. UNIX for Dummies Questions & Answers
Need help !
how do i compare 2 files and if there is a difference, output a massage in a pop up window?
the script meant to run using crontab. (2 Replies)
Discussion started by: hongsh
2 Replies
10. UNIX for Dummies Questions & Answers
Hello,
There are directories named by "yyyyMMdd" format. The one directory name is given and I should find & print that directory & its previous days directory names if exist.
For example:
20080401
20080402
20080403
20080404
...
The given date: 20080403
The result:
20080403... (4 Replies)
Discussion started by: mr_bold
4 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 are 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.
Generally, enable and disable are run on the print server to control local print queues. Under some configurations, they can also be run on
client systems when IPP is being used to communicate between client and 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 is 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 is 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 or URI-style (scheme://endpoint) names. See
printers.conf(4) regarding the naming conventions for destinations.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
non-zero An error occurred.
FILES
/etc/printers.conf System printer configuration database
$HOME/.printers User-configurable printer database
ou=printers LDAP version of /etc/printers.conf
printers.conf.byname NIS version of /etc/printers.conf
printers.org_dir NIS+ version of /etc/printers.conf
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWlp-cmds |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
|CSI |Enabled |
+-----------------------------+-----------------------------+
SEE ALSO
lp(1), lpstat(1), printers.conf(4), attributes(5)
NOTES
When IPP is in use, the user is prompted for a passphsrase if the remote print service is configured to require authentication.
SunOS 5.11 5 Jun 2006 enable(1)