Re: tac replacement
- From: Jürgen Kahrs <Juergen.KahrsDELETETHIS@xxxxxxxxx>
- Date: Mon, 26 Nov 2007 22:16:49 +0100
yiyu.jgl@xxxxxxxxx schrieb:
I need to process the end of a file before the beginning. I have seen
some threads where a tac | awk ... | tac solution is proposed, but
there is always the problem of not having tac in your system.
If you have a Unix sort command, then try this:
awk '{print NR, $0}' data_file.txt | sort -n -r | awk '{$1=""; print $0}'
.
- Follow-Ups:
- Re: tac replacement
- From: Ed Morton
- Re: tac replacement
- References:
- tac replacement
- From: yiyu.jgl@xxxxxxxxx
- tac replacement
- Prev by Date: tac replacement
- Next by Date: Re: awk question
- Previous by thread: tac replacement
- Next by thread: Re: tac replacement
- Index(es):
Relevant Pages
|