'sort' in linux is sometimes very usefult. For example, I have a file like this:
pt 2.9
eta 3.0
phi 4.5
px 2.1
If you want to rank those variables due to the increasing order of the 2nd column, then you can use 'sort -n -k2 yourfile.txt'. '-k2' means the position of the key is the 2nd.
Monday, February 25, 2008
Linux:command: sort
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment