i am having a problem finding the lowest number after punching in a bunch of numbers in the .txt file but its probably the way i have the code set up.
help please!
i am having a problem finding the lowest number after punching in a bunch of numbers in the .txt file but its probably the way i have the code set up.
help please!
We don't know how your text file looks like... We dont't know how you are punching in the numbers... So show us...
If the text file has the numbers line by line, try this...
sort input.txt | head -1
--ahamed
in my text file is:
22
3
5
2
1
Then this should work...
sort input.txt | head -1
--ahamed
In case of numerical sort, "-n" option must be used.
$ sort -n ff
1
2
3
5
22
$ sort ff
1
2
22
3
5
$