Oct 23, 2010 #1 tivona Technical User Oct 23, 2010 6 HK Dear all, I would like you have your advice on how to generate the following pattern of sequence numbers using awk. Input 2 4 3 Output 2 1 4 3 2 1 3 2 1 Thanks in advance Tivona
Dear all, I would like you have your advice on how to generate the following pattern of sequence numbers using awk. Input 2 4 3 Output 2 1 4 3 2 1 3 2 1 Thanks in advance Tivona
Oct 24, 2010 1 #2 PHV MIS Nov 8, 2002 53,708 FR Typed, untested: Code: awk '{for(i=$1;i>0;--i}print i}' /path/to/input Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Typed, untested: Code: awk '{for(i=$1;i>0;--i}print i}' /path/to/input Hope This Helps, PH. FAQ219-2884 FAQ181-2886
Oct 25, 2010 Thread starter #3 tivona Technical User Oct 23, 2010 6 HK Dear PH, It works great except for a missing ")". awk '{for(i=$1;i>0;--i) print i}' /path/to/input Cheers, Tivona Upvote 0 Downvote
Dear PH, It works great except for a missing ")". awk '{for(i=$1;i>0;--i) print i}' /path/to/input Cheers, Tivona