Search Results

Search: Posts Made By: rpd25
8,775
Posted By vbe
ls energy.dat.*|sort -rn|head -1
ls energy.dat.*|sort -rn|head -1
8,775
Posted By Franklin52
Try this: energy.dat.* | awk -F\....
Try this:
energy.dat.* | awk -F\. 'm<$NF{m=$NF;s=$0}END{print s}'
8,775
Posted By pandeesh
if you want it to store in a variable , just use...
if you want it to store in a variable , just use the below command:

max_number=`ls energy.dat.*|sort -rn|head -1`
8,775
Posted By balajesuri
A slight modification to vbe's one-liner: ls...
A slight modification to vbe's one-liner:

ls energy.dat.* | sort -nrk1.12 | head -1
8,775
Posted By pandeesh
Hi, Could you please explain how that command...
Hi,
Could you please explain how that command behaved without key -k specification .
I don't have unix to test it currently

Thanks
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 10:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy