shell pipeline to reverse the order of lines.
Mika R Iisakkila
iisakkil at niksula.hut.fi
Sun Mar 3 00:12:43 AEST 1991
Since this will probably be a never-ending thread, I'll post
the most pervert way I could think of doing the deed:
awk 'BEGIN{l=10000;}{printf("%d %s\n",l++,$0);}' | sort -r | colrm 1 6
Replace 'colrm 1 6' with 'cut -c7-' if you're on System V.
Slight modifications required, if the file is large (what's the limit
for scalar values in awk? Or does sort die first?). Hope that someone
finds this at least marginally amusing...
More information about the Alt.sources.d
mailing list