Answer the question
In order to leave comments, you need to log in
Sorting bash output?
Hello! I have bash output in the format:
line1 22
line2 32
line3 444
Please help me. You need to assign the maximum value to the variable, and delete all the rest.
Answer the question
In order to leave comments, you need to log in
max=$(cut -d" " -f2 dat.txt|sort|xargs|rev|cut -d" " -f1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question