04-19-2010
first colum in descending and secong column in asc
sort -k1,1nr -k2,2n filename
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
file format is
word filename no.of occurances
------------------------------
wish f3.txt 2
wish f2.txt 1
cold f1.txt 5
cold f2.txt 3
cold f1.txt 3
cold e.txt 3
gold f1.txt 7
gold f3.txt 3
rush e.txt 2
itz abt building a search index for every word in the files given as input
the... (1 Reply)
Discussion started by: vishnu_vaka
1 Replies
2. UNIX for Dummies Questions & Answers
I have a file with several columns:
Column1 Column2 Column3. . .Column6
I want to sort the data from Column6. Could I do that through sort even if there are spaces in between fields?
Much thanks!
outta. (3 Replies)
Discussion started by: outtacontrol
3 Replies
3. UNIX for Dummies Questions & Answers
guys i have a question:
i'd like to sort files (as many I want) in columns so to visualize them one near the other...so let's say i have just 2 files:
FILE1
John
Mary
Bridget
FILE2
Anne
Robert
Mark
i would like to obtain:
John Anne
Mary Robert
Bridget ... (2 Replies)
Discussion started by: marshmallow
2 Replies
4. Shell Programming and Scripting
Hi gang.
I'm using a unix/mac system and i'm trying to sort a file (more than 1,000,000 lines).
chr1 100000965 100001001 -
chr1 100002155 100002191 +
chr1 100002165 100002201 +
chr1 100002525 100002561 -
chr1 10000364 ... (2 Replies)
Discussion started by: labrazil
2 Replies
5. UNIX for Dummies Questions & Answers
Please help to sort columns in this file:
a b d f c e
1 4 10 16 7 13
2 5 11 17 8 14
3 6 12 18 9 15
I need to sort COLUMNS (so sort command doesn't work) like this:
a b c d e f
1 4 7 10 13 16
2 5 8 11 14 17
3 6 9 12 15 18
I know sed can do it but don't know how... :( (7 Replies)
Discussion started by: coppuca
7 Replies
6. Shell Programming and Scripting
Hello!
I am very new to Linux and I do not know where to begin...
I have a column with >64,000 elements (that are not in numberical order) like this:
name
2
5
9
.
.
.
64,000
I would like to transpose this column into a row that will later become the header of a very large file... (2 Replies)
Discussion started by: doobedoo
2 Replies
7. Shell Programming and Scripting
Dear Programmers
I have a file called ranking.txt, in which I have 4 chemical compounds in *.sdf file format named ligands_m1, ligands_m2, ligands_m3, ligands_m4.
Each compounds is assigned with a particular score along with the file location. ... (0 Replies)
Discussion started by: robertselwyne
0 Replies
8. Shell Programming and Scripting
i have a file with two columns, and i want to uniquely sort the values in fist column and add the corresponding values in the second columns
eg
file a contents
tom 200
john 300
sow 500
tom 800
james 50
sow 300
output shpould be in file b as
tom 1000
john 300
sow 800
james 50 (0 Replies)
Discussion started by: dealerso
0 Replies
9. UNIX Desktop Questions & Answers
Hi;
I have a text file like this:
1
10
11
2
3
4
M
X
Y
When I sort it numerically using sort -n, it looks like this:
Y
X
M
1
2
3
4
10 (3 Replies)
Discussion started by: a_bahreini
3 Replies
10. Shell Programming and Scripting
Hi, I have a tab delimited columnar file where I want to remove lines wherever two particular columns match. so for this file, I want to toss the lines where columns 1 and 2 match:
a a 1 3
a b 2 4
b b 3 5
because there are matches column 1 and 2 in lines 1 and 3, I would like a script to... (2 Replies)
Discussion started by: mikey11415
2 Replies
asc(6) Games Manual asc(6)
NAME
asc - Advanced Strategic Command - turn based strategy game
SYNTAX
asc [options]
DESCRIPTION
This program is a free (GPL) turn based strategy game in the tradition of BattleIsle 2/3. Game can be played against human or computer. It
features a 2-dim. map that is tiled into hexagons where units are placed. The object of the game varies from map to map. The most commonly
know goal is to completely eliminate an oppononet by detroying all his units.
OPTIONS
The following options are supported:
-x --xresolution <value> (640... default=800)
Set horizontal resolution to <value>
-y --yresolution <value> (480... default=600)
Set vertical resolution to <value>
-l --load <string>
Load a map, saved game, or email game on startup
-c --configfile <string>
Use given configuration file
-r --verbose <value> (0...10 default=0)
Set verbosity level to <value>
-w --window Disable fullscreen mode
-f --fulscreen Enable fullscreen mode (overriding config file)
-q --nosound Disable sound
-h --help Display help information
-v --version Output version
SEE ALSO
asc_demount (6), asc_makegfx (6), asc_mapedit (6), asc_mount (6), asc_weaponguide (6)
AUTHORS
The ASC game is developed by Martin Bickel <bickel@asc-hq.org>.
This man page was written by Bartosz Fenski <fenio@o2.pl> (some parts were grabbed from Michael Moerz's work) for the Debian GNU/Linux dis-
tribution (but it may be used by others).
1.15.0 asc(6)