Microsoft
Software
Hardware
Network
Question : A tiny Bash Script to sort and show
Hi:
Consider I have a text file as this one in attached, and I need a tiny Bash script to just sort it by its first field (the numeric field) and display it in the screen. Questions:
1) Is it possible to sort it in descending order? (just in case)
2) Is it possible to sort it by the first field and then by the second field? (just in case too)
Thanks.
Mario./
Answer : A tiny Bash Script to sort and show
cat filex.txt | sort -nr
will do the job
-n is for numeric sort and -r is for descending order
if u want to sort by the second field try
cat filex.txt | sort -k2
hope this is what you mean
Random Solutions
Reporting Services 2005 - Currency Format Style for fixed currency symbol
Urgent - Creating Word document - Ok in NT, Error in 2000
How could I display the file extensions in the file explorer of windows mobile 6 ?
Cognos Impromptu Catalog Question
Microsoft Proxy Client for Linux
wireless driver
Windows Server 2003 Standard Edition - How to address more then 4GB of memory
Using Set_item_property default_where
Running Silverlight 3.0 Out of Browser
Problems using Ghost Boot Flash Drive on HP DC 7700