Sponsored Content
Top Forums UNIX for Dummies Questions & Answers need help sorting/deleting non-unique things Post 302351229 by daPeach on Monday 7th of September 2009 05:58:09 PM
Old 09-07-2009
Code:
sort -ozac100.out -k12 -k11 -u zac100.in

cat zac100.out
1 1 1 1 1 1 1 1 1 2 1 1_2 2_1
1 1 1 1 1 1 1 1 2 1 2 1_2 2_1
1 1 1 1 1 1 2 1 2 1 1 1_2 2_1 
1 1 1 1 1 1 1 1 3 1 1 1_3 3_1
1 1 1 1 1 1 1 3 1 1 3 1_3 3_1
1 1 1 1 1 1 1 4 1 1 1 1_4 4_1

is that it?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sorting file and unique commnad..

hello everyone.. I was wondering is there a effective way to sort file that contains colomns and numeric one. file 218900012192 8938929 8B8DF3664 1E7E2D59D5 0000 26538 1234 74024415 218900012979 8938929 8B8DF3664 1E7E2D59D5 0000 26538 1234 74024415 218900012992 8938929 8B8DF3664... (2 Replies)
Discussion started by: amon
2 Replies

2. UNIX for Dummies Questions & Answers

Sorting with unique piping for a lot of files

Hi power user, if I have this file: file1.txt: 1111 1111 2222 2222 3333 3333 3333 4444 4444 4444 when I run the sort file1.txt | uniq > data1.txt the result is (2 Replies)
Discussion started by: anjas
2 Replies

3. Shell Programming and Scripting

get part of file with unique & non-unique string

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

4. Shell Programming and Scripting

Finding unique entries without sorting

Hi Guys, I have two files that I am using: File1 is as follows: wwe khfgv jfo jhgfd hoaha hao lkahe This is like a master file which has entries in the order which I want. (4 Replies)
Discussion started by: npatwardhan
4 Replies

5. Shell Programming and Scripting

Need help comparing two files and deleting some things in those files!

So I have two files: File1 pictures.txt 1.1 1.3 dance.txt 1.2 1.4 treehouse.txt 1.3 1.5 File2 pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244 dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2 ref4948 1.1 treehouse.txt 1.6 ref8573 1.5 ref3284 1.4 ref5838... (24 Replies)
Discussion started by: linuxkid
24 Replies

6. UNIX for Dummies Questions & Answers

Deleting words and sorting

I have a file that looks some like this: I need to delete most of the information and sort the rest in such way that I get the following output file Any help will be greatly appreciated (3 Replies)
Discussion started by: Xterra
3 Replies

7. Shell Programming and Scripting

Change unique file names into new unique filenames

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

8. UNIX for Dummies Questions & Answers

Sorting and saving values based on unique entries

Hi all, I wanted to save the values of a file that contains unique entries based on a specific column (column 4). my sample file looks like the following: input file: 200006-07file.txt 145 35 10 3 147 35 12 4 146 36 11 3 145 34 12 5 143 31 15 4 146 30 14 5 desired output files:... (5 Replies)
Discussion started by: ida1215
5 Replies

9. Shell Programming and Scripting

Sorting out unique values from output of for loop.

Hi , i have a belwo script which is used to get sectors per track value extarcted from Solaris machine: for DISK in /dev/dsk/c*t*d*s*; do value=`prtvtoc "$DISK" | sed -n -e '/Dimensions/,/Flags/{/Dimensions/d; /Flags/d; p; }' | sed -n -e '/sectors\/track/p'`; if ; then echo... (4 Replies)
Discussion started by: omkar.jadhav
4 Replies

10. Shell Programming and Scripting

Sorting unique by column

I am trying to sort, do uniq by 1st column and report this 4 columns tab delimiter table , eg chr10:112174128 rs2255141 2E-10 Cholesterol, total chr10:112174128 rs2255141 7E-16 LDL chr10:17218291 rs10904908 3E-11 HDL Cholesterol chr10:17218291 rs970548 8E-9 TG... (4 Replies)
Discussion started by: fat
4 Replies
ISDNRATE(1)						      General Commands Manual						       ISDNRATE(1)

NAME
isdnrate - Print telefon rates and various info from rate-files(5). SYNOPSIS
isdnrate -bbest -dday -ffrom -hhour -llen -o -pprovs -r vNN -s -ttakt -vverbose -xexclude -C -Ddet -Gdata -H -L -N -Osocketfile -Ppiddir -Ssort -T -U -V -Xexplain -Z NUMBER ... All options are optional. DESCRIPTION
The isdnrate program prints various information from rate-files(5). It's main purpose is the calculation of telefon rates from your loca- tion to an arbitrary destination at a certain time and of a certain length for all the providers in a rate-file. NUMBER A telefon number may be 1234 a local area number 01234 a different area in your country +12345 a foreign country China text for a foreign country Paris a town US a code as defined in country.dat. Internet a Service name (if option -s is also given). Note that currently only city names in AT, DE, NL are supported plus some international capitals. Note also, spaces in country- or service names may be given as underscores. OPTIONS -bbest Print only best providers. Default is all. -crateconf Use rateconf as provider selection file and ignore setting in isdn.conf. -dday Calc rates for day. day can be one of dd day of current month dd.mm day month dd.mm.yy[yy] day, month, year W Weekday N Weekday - night E Weekend Default is now. -ffrom Callers location. Default ist from isdn.conf. -hhour Time hh[:mm[:ss]] of call. Default is now. -iratefile Use ratefile (usually rate-CC.dat) as source for telephone fees and ignore setting in isdn.conf. -llen Length of call in second. Default value is 153 secs. -o Show only booked providers. These are providers, which are listed in rate.conf. -p provider[,provider...] Print only info for given provider(s). provider is the provider number, without the leading VBN, or provider_variant if there are more variations, or B for business providers. -rvNN Show only providers whose vbn begins with NN. The vbn is also known as provider prefix consisting of VBN and provider number. -s Consider NUMBER as the name of a service and print all numbers / providers, which supply this service. -ttakt Print only providers, which have calculation impulses smaller or equal to takt. Default is 9999. -vverbose Set verbose level. -x provider[,provider...] Exclude these provider(s). DISPLAY AND RUN OPTIONS -C Connect to a running isdnrate daemon. This avoids long startup times. -D Start as a daemon, waiting for connections from a client. The socket /tmp/isdnrate is created, which clients can connect to. -D2 Start as a daemon and go background. -CD3 Stop a running daemon. -Gn Print raw data for connection. n may be currently 97,98,99. -H Print a header. -L Print a semicolon separated list of vbn ; providername ; zone ; day ; time ; currency ; charge ; basicprice ; price ; duration ; charge/min ; takt ; minimum price -N Show info about following numbers. If no provider is given, the preselected provider is used. -Osocketfile Write socket to given filename on start of daemon. Default is tmp/isdnrate. -Ppiddir Write own PID to piddir/isdnrate.pid on start of daemon. -Ssort Sort output by sort, which may be v vbn or n provider name. Default is by charge. -T Print a table of charges for daytimes weekday/weekend. -V Print version info and exit. -Xexplain Print additional information for charge or from rate-file. explain may be 1 (zone) 2 (charge/min, zone, day, time) 50 International areas 51 National zones 52 Services COMMENT Print C:COMMENT: info from rate files. If -s is given, the number of the service is also listed with -X1 or -X2. -Z Print info for LCR e.g. isdnrate -p1 -ZX 19430 shows the rate for provider 1 and the cheapest rate to this service. Note: Various output options may not be used together. If you gave conflicting options you'll see a warning. Note also: Sort by name or providernumber and -bbest will bring you the first best providers in sorting order, not the cheapest. And finally: Some options like -X50, -X51, -X52, -D, -V don't require a telefon NUMBER. FILES
rate-CC.dat, holiday-CC.dat, dest.gdbm, zone-CC-PPP.gdbm, isdn.conf, telrate.cgi and more. Note: The extension of zone- and dest data files depends on configuration. Recently .cdb is used. EXAMPLES
isdnrate -D2 Start the isdnrate daemon. isdnrate -D2 -P /var/run -O /tmp/isdnr_socket Start the isdnrate daemon, write isdnrate.pid to /var/run and create the given socket. isdnrate -CH -b5 -f01 -l120 Attersee Connect to running daemon, print a header and the best 5 rates from Vienna (01) to destination Attersee for a connection length of 2 Min- utes. isdnrate -CX -p1_2,24 +1 Show rates and zones for destination USA for providers 1_2 and 24. isdnrate -C -l60 -rv010 HAM Show rates for a one minute call to Hamburg (HAM: airport code) and use only providers whose vbn begins with 010. So provider A with vbn 01030 is displayed, provider B with vbn 0190023 is not. isdnrate -CX -H -dW -b5 US CA Show a header, rates and zones for destinations USA and Canada for best 5 providers during workday. isdnrate -CHoX US Show header, rate and zone for destination USA for booked providers only. isdnrate -CsX -l60 Internet Show rates and numbers for service Internet for a 1 minutes call. isdnrate -CZ 19430 Show rates and the best provider for this (service-)number. isdnrate -CD3 Stop the running isdnrate daemon. SIGNALS
A isdnrate daemon restarts (and therefore rereads its configuration) on getting a SIGHUP signal. SEE ALSO
rate-files(5), isdnlog(8), isdn.conf(5) BUGS
Definitely yes. Sometimes more then one daemon can be started, sometimes the socket is not removed, when the daemon terminates. if this happens ('socket in use'), do a rm /tmp/isdnrate and try again. AUTHORS
Andreas Kool <akool@isdn4linux.de> started this program. Leopold Toetsch <lt@toetsch.at> continued the work and brought this man page to you. Michael Reinelt <reinelt@eunet.at> did the calculation engine and various tools for it. -lt- 2004/07/13 ISDNRATE(1)
All times are GMT -4. The time now is 05:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy