09-13-2013
Print unique lines without sort or unique
I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an archive file that holds a batch of statements. I would like to be able to extract a certain statement based on the unique customer # (ie. 123456). The end for each statement is noted by "ENDSTM".
I can find the line number for the beginning of the statement section with sed.
... (5 Replies)
Discussion started by: andrewsc
5 Replies
2. Shell Programming and Scripting
Input file
---------
12:name1:|host1|host1|host2|host1
13:name2:|host1|host1|host2|host3
14:name3:
......
Required output
---------------
12:name1:host1(2)|host1(1)
13:name2:host1(2)|host2(1)|host3(1)
14:name3:
where (x) - Count how many times field appears in last column
... (3 Replies)
Discussion started by: greycells
3 Replies
3. Shell Programming and Scripting
I have a file with contents below
123,502
123,506
123,702
234,101
235,104
456,104
456,100
i want to sort such that i get a unique value in column A, and for those with multiple value in A, i want the lowest value in B.
output should be
123,502
234,101
235,104
456,100 (3 Replies)
Discussion started by: dealerso
3 Replies
4. Shell Programming and Scripting
Hi.
I have a tab separated file that has a couple nearly identical lines. When doing:
sort file | uniq > file.new
It passes through the nearly identical lines because, well, they still are unique.
a)
I want to look only at field x for uniqueness and if the content in field x is the... (1 Reply)
Discussion started by: rocket_dog
1 Replies
5. Shell Programming and Scripting
Hi friends,
I have multiple files. For now, let's say I have two of the following style
cat 1.txt
cat 2.txt
output.txt
Please note that my files are not sorted and in the output file I need another extra column that says the file from which it is coming. I have more than 100... (19 Replies)
Discussion started by: jacobs.smith
19 Replies
6. Shell Programming and Scripting
I have 84 files with the following names splitseqs.1, spliseqs.2 etc.
and I want to change the .number to a unique filename.
E.g.
change splitseqs.1 into splitseqs.7114_1#24
and
change spliseqs.2 into splitseqs.7067_2#4
So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies
7. Shell Programming and Scripting
Hi everyone,
I have the following file, which is a 3 column tab-delineated.
cat big 24
cat small 13
cat red 63
dog big 34
chicken plays 39
fish red 294
I would like to print only those lines, in which the value in Col2 is repeated. Thus, given the above input file, the desired... (7 Replies)
Discussion started by: owwow14
7 Replies
8. Shell Programming and Scripting
Hi,
I have an input file that I have sorted in a previous stage by $1 and $4. I now need something that will take the first record from each group of data based on the key being $1
Input file
1000AAA|"ZZZ"|"Date"|"1"|"Y"|"ABC"|""|AA
1000AAA|"ZZZ"|"Date"|"2"|"Y"|"ABC"|""|AA... (2 Replies)
Discussion started by: Ads89
2 Replies
9. UNIX for Beginners Questions & Answers
For some reason I am having difficulty performing what should be a fairly easy task. I would like to print lines of a file that have a unique value in the first field. For example, I have a large data-set with the following excerpt:
PS003,001 MZMWR/ L-DWD// *
PS003,001... (4 Replies)
Discussion started by: jvoot
4 Replies
10. UNIX for Beginners Questions & Answers
I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with:
wc -l *|sort
15263 Image.txt
16401 reference.txt
40459 richtexteditor.txt
How can I also print the number of unique lines in each file?
15263 1401 Image.txt
16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
LEARN ABOUT XFREE86
afp_signature.conf
AFP_SIGNATURE.CONF(5) Netatalk 2.2 AFP_SIGNATURE.CONF(5)
NAME
afp_signature.conf - Configuration file used by afpd(8) to specify server signature
DESCRIPTION
/etc/netatalk/afp_signature.conf is the configuration file used by afpd to specify server signature automagically. The configuration lines
are composed like:
"server name" hexa-string
The first field is server name. Server names must be quoted if they contain spaces. The second field is the hexadecimal string of 32
characters for 16-bytes server signature.
The leading spaces and tabs are ignored. Blank lines are ignored. The lines prefixed with # are ignored. The illegal lines are ignored.
Note
Server Signature is unique 16-bytes identifier used to prevent logging on to the same server twice.
Netatalk 2.0 and earlier generated server signature by using gethostid(). There was a problem that another servers have the same
signature because the hostid is not unique enough.
Current netatalk generates the signature from random numbers and saves it into afp_signature.conf. When starting next time, it is read
from this file.
This file should not be thoughtlessly edited and be copied onto another server. If it wants to set the signature intentionally, use the
option "-signature user:xxxx" in afpd.conf. In this case, afp_signature.conf is not used.
EXAMPLES
Example. afp_signature.conf three servers on one netatalk
# This is a comment.
"Guest Server" 251D25569CB29AFDF296C6B5B3A385B7
"User Server" 26B5D785046C019F55718F76B1C13BFB
special 74A0BB94EC8C13988B2E75042347E528
SEE ALSO
afpd(8), afpd.conf(5), asip-status.pl(1)
Netatalk 2.2 08 Mar 2011 AFP_SIGNATURE.CONF(5)