How can I convert this:
-foo -bar 42 \
randomtext=00 "00" \
-randomtext=00 "00" \
-foo -bar 104 \
randomtext=00 "00" \
-foo -bar 1 \
-randomtext=00 "00" \
To this:
-foo -bar 1 \
-randomtext=00 "00" \
-foo -bar 42 \
randomtext=00 "00" \
-randomtext=00 "00" \
-foo -bar 104 \
randomtext=00 "00" \
I would like to sort the clusters of lines based on the numeric value after -bar
cut
andsort
are your friends...-
and that the inner entries always don't?