2 ms·
We can eliminate the paste by using sed's hold buffer, but it costs another regexp to get rid of the spurious newline: sed -e "h;s/./x/g;G;s/\n/\t/g" list.
by jloughry 13y ago
We can eliminate the paste by using sed's hold buffer, but it costs another regexp to get rid of the spurious newline:
sed -e "h;s/./x/g;G;s/\n/\t/g" list.txt | sort | cut -f2