The problem is with the grep "-v" option, it prints all lines that don't match a pattern, in your case the value of ${i}.
Try:
This did not produce the desired result. For some reason the master_touch_list still had items in it from the dont_touch_list. But thank you for the suggestion!
Quote:
Originally Posted by ahamed101
Try this...
--ahamed
Without going through and individually checking each and every item in the master_touch_list this appears to have worked. Running a for loop grepping each item from the dont_touch_list in the master_touch_list produced no results so I think I'm good. Appreciate your help and I'll keep murphy's suggestion in mind as well.
All,
Can anybody provide me the links to the documentation on UniQPrint?
I need to prepare some documents to help my co-workers to learn UniQPrint.
Regards,
Vishal (0 Replies)
Hi,
I'd like to have a script what takes the 'who' output and grabs the user names and outputs just the user name, and no duplicates.
I know I could do something like:
who | awk '{print $1}' | uniq -u
but I'd like to stay away from using the 'uniq' comand and just use awk.
Thanks (5 Replies)
How can I use uniq on a certain field or what else could I use? If I want to use uniq on the second field and the output would remove one of the lines with a 5.
bob 5 hand
jane 3 leg
jon 4 head
chris 5 lungs (1 Reply)
Hi folks,
Below is the content of a file 'tmp.dat', and I want to keep the uniq record (key by first column). However, the uniq record should be the last record.
302293022|2|744124889|744124889
302293022|3|744124889|744124889
302293022|4|744124889|744124889
302293022|5|744124889|744124889... (4 Replies)
When I do uniq -c on a list of sorted numbers,
for eg:
1
1
2
2
2
3
3
4
It outputs 2 1
3 2
2 3
1 4.
Now, is there a way to sort on the column that "uniq -c" produced? (2 Replies)
Hi
I'm having a file (extract.txt) which contains lots of repeated values i want to extract it only with unique values,while am using the the uniq command
It result's with 1510 lines this too have the duplicates,pls help me on this.
I attached my extract.txt file as attachment here.
... (2 Replies)
Hello,
I have recently imported all my scripts into OS X. There is one unix command that is problematic in the new environment:
sort temp7.txt | uniq -u -w4 > temp8.txt
The system doesn't seem to like the -w tag. Is there an alternative command?
Here is the objective:
Data:
1234 aaa... (1 Reply)
hello
I want to check on first column duplicates and print the unique first and second columns
My trial output is not generating what I needed, i.e the second column.
thanks in advance (5 Replies)
Discussion started by: bhargavpbk88
5 Replies
LEARN ABOUT OPENSOLARIS
ypinit
ypinit(1M) System Administration Commands ypinit(1M)NAME
ypinit - set up NIS client
SYNOPSIS
/usr/sbin/ypinit [-c] [-m] [-s master_server]
DESCRIPTION
ypinit can be used to set up an NIS client system. You must be the superuser to run this command. This script need not be used at all if
ypbind(1M) is started with the -broadcast option (it is invoked with this option from the svc:/network/nis/client:default service).
Normally, ypinit is run only once after installing the system. It may be run whenever a new NIS server is added to the network or an exist-
ing one is decommissioned.
ypinit prompts for a list of NIS servers to bind the client to; this list should be ordered from the closest to the furthest server. It is
recommended that you list each of these NIS servers by name and numeric IP address in /etc/hosts. Though the practice is not recommended,
NIS allows you to list servers by numeric address only, bypassing /etc/hosts. In such a configuration, ypwhich(1) returns a numeric address
instead of a name.
ypinit stores the list of servers to which a client can bind in the file /var/yp/binding/domain/ypservers. This file is used by ypbind when
run without the -broadcast option.
OPTIONS -c
Set up a ypclient system.
-m
Build a master ypserver data base.
-s master_server
Slave data base. master_server must be the same master configured in the YP maps and returned by the ypwhich -m command.
FILES
/etc/hosts
File in which it is recommended that NIS servers be listed.
/var/yp/binding/domain/ypservers
Lists the servers to which the NIS client is allowed to bind.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnisu |
+-----------------------------+-----------------------------+
SEE ALSO svcs(1), ypwhich(1), svcadm(1M), ypbind(1M), sysinfo(2), hosts(4), attributes(5), smf(5)NOTES
The NIS client service is managed by the service management facility, smf(5), under the service identifier:
svc:/network/nis/client:default
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser-
vice's status can be queried using the svcs(1) command.
BUGS
ypinit sets up the list of NIS servers only for the current domain on the system when it is run, that is, the domain returned by the
SI_SRPC_DOMAIN command to sysinfo(2). Care should be taken to ensure that this is the same as the desired domain for NIS client processes.
SunOS 5.11 20 Dec 2007 ypinit(1M)