05-10-2004
Seems like you want it reversed from what you are showing - add the -r option and see if that gives you what you are looking for.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello,
i have a table contain many columns delimited by blank.
i want to sort this table by the 2 columns and 3 one and i want to keep the first line inchanged?
how can i do using the sort command?
thanks
table like :
field1 field2 field3 field4
x y z b
t h r n
.. (4 Replies)
Discussion started by: kamel.seg
4 Replies
2. Shell Programming and Scripting
Hello all:
i have list with the following format
Id Name Iid Value
0x4440001 customerCode 44077
0x11d2a PrimaryAddress 57.217.41.201
0x129fa ... (15 Replies)
Discussion started by: mogabr
15 Replies
3. UNIX for Dummies Questions & Answers
Hope someone can help,
I am trying to sort a generic file like this
test2 A 468 0
test2 R 468 1
test2 E 468 1
test2 R 468 3
test2 R 468 4
test2 R 468 459
test2 Z 468 0
test1 A 191 0
test1 R 191 191
test1 Z 191 0
test3 A 3 0
test3 R 3 3
test3 Z 3 0
test0 A 1 0
test4 A 1 0
test4 E... (2 Replies)
Discussion started by: gio001
2 Replies
4. UNIX for Dummies Questions & Answers
Hi, I am trying to sort a file first by the string column, then by the number column.
file:
xyz1 2
xyzX 4
xyz2 1
xyz13 3
xyz11 5
xyz13 10
xyz1 1
xyz10 1
xyz4 2
result should be
xyz1 1
xyz1 2 ... (3 Replies)
Discussion started by: fargo
3 Replies
5. UNIX for Dummies Questions & Answers
Hi,
A basic query. In the example file below, I want to sort by column 1 and then by column 2 numerically. I have tried sort -k2n,1 file1 but while this sorts the columns in the correct order, it does not sort column 2 numerically. Any help would be much appreciated. Also, if you have time to... (3 Replies)
Discussion started by: auburn
3 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a text file that looks like this and I need a bash script to:
12:48:32 PM 002* OUT 000418
01:10:34 PM 002* ONL 000418
01:49:17 PM 001* OUT 000364
01:52:09 PM 001* ONL 000364
...
The fields are: 12-hour format time, some number, state (online, offline) and another... (2 Replies)
Discussion started by: Ravendark
2 Replies
7. Shell Programming and Scripting
Howdy!
Need to sort a large .txt file containing the following, using sort. First based on the 1st column, and then on the 2nd column:
Group01.01 1000500 31 0.913 -1.522974494
Group01.01 1001500 16 0.684 -0.967496041
Group01.01 36500 19 0.476 na
Group01.02 365500 15 0.400 na... (1 Reply)
Discussion started by: sramirez
1 Replies
8. Shell Programming and Scripting
File will have two columns key column and second column which is pipe separated and that need to be sorted.
Below is input file.
1, D|B|A|C
2, C|A|B
3, E|A|F|G|H|D|B|C
4, A|B|D|C|F
Output should be
1, A|B|C|D
2, A|B|C
3, A|B|C|D|E|F|G|H
4, A|B|D|C|F (11 Replies)
Discussion started by: girish119d
11 Replies
9. Shell Programming and Scripting
hi all,
i have a file , having few columns. i wanted to sort it based on 2nd column and then based on 1st column. But i have some problem in first column.
first column have characters and numbers, but problem is number of characters are not same in all rows. Few rows have 13 characters and then... (3 Replies)
Discussion started by: deepakiniimt
3 Replies
10. Shell Programming and Scripting
Hi geeks!
I want to convert the following:
EPC-NotificationData: sms:2348034503643
EPC-GroupIds: 300H:10:22-01-2014T07:30:14,22-04-2014T07:30:14
To:
EPC-NotificationData: sms:2348034503643, EPC-GroupIds: 300H:10:22-01-2014T07:30:14,22-04-2014T07:30:14
I want them to be on the same... (13 Replies)
Discussion started by: infinitydon
13 Replies
LEARN ABOUT LINUX
acyclic
ACYCLIC(1) General Commands Manual ACYCLIC(1)
NAME
acyclic - make directed graph acyclic
SYNOPSIS
acyclic [ -nv? ] [ -o outfile ] [ file ]
DESCRIPTION
acyclic is a filter that takes a directed graph as input and outputs a copy of the graph with sufficient edges reversed to make the graph
acyclic. The reversed edge inherits all of the attributes of the original edge. The optional file argument specifies where the the input
graph is stored; by default, the program reads from stdin.
OPTIONS
The following options are supported:
-n No output is produced, though the return value will indicate whether the graph is acyclic or not.
-v Print information about whether the file is acyclic, has a cycle or is undirected.
-o outfile
causes the output to be written to the specified file; by default, output is written to stdout.
-? option causes the program to print usage information.
RETURN CODES
acyclic returns 0 if the graph is acyclic; 1 if the graph has a cycle; 2 if the graph is undirected; and 255 if there are any errors.
BUGS
If the graph is strict and there is a cycle of length 2, the attributes of the reversed edge are lost.
Some edge attributes are non-symmetric, referring to either the head or tail node. At present, there is no mechanism or convention for cor-
rectly switching or renaming these.
AUTHORS
Stephen C. North <north@research.att.com>
Emden R. Gansner <erg@research.att.com>
SEE ALSO
gc(1), dot(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3)
21 March 2001 ACYCLIC(1)