3 # kinda natural sorting for sets
4 # prepend every line with a modified path where
5 # slashes are replaced by "1" and "0" is added
6 # at the end of the string.
11 #.1bin1cat0 ./bin/cat minix-sys
13 # This entry gets sorted after wich the key is removed using
16 # Additionally all lines starting with "#" are put on
17 # top in the order they where put in the file. this is done
18 # by creating a "key" with the value COUNTER
23 A
=$
(echo $i | cut
-f 1 -d ' ' |
sed "s,^#,00$COUNTER,g" |
sed 's,/,1,g' )
25 COUNTER
=$
(($COUNTER +1))
26 done |
sort | cut
-d ' ' -f 2-