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
How to manually download Microsoft Updates to make a personal update database?
vids:iv50 decompressor
How to export or extract Outlook calendar to Excel?
mstsc /span - Is there a way to save settings so an rdp shortcut will open with the span option?
PowerShell - Array of arrays
In windows vista, how do you access c:\documents and settings? I get access denied even though I'm an administrator on the local pc.
split a large mpg video file into small mpg files
Hh.exe ?
Ghost workstation with RAID Controller
convert to lowercase