View Single Post

  #1 (permalink)  
Old 04-07-2008
A
 
Posts: n/a
Default reverse effect of uniq -c

Hi,

I am wondering if there is a simple shell manipulation that can
produce the reverse effect of using uniq -c. In other words, how can I
create a file x.txt so that when I type 'uniq -c x.txt' on the shell,
I get the following output?


4 "0" "1" "1" "1" "1"
31 "0" "2" "0" "0" "0"
142 "0" "2" "0" "0" "1"
173 "0" "2" "0" "0" "2"
1 "0" "2" "0" "0" "NA"
1 "0" "2" "0" "NA" "1"
1 "0" "NA" "NA" "NA" "1"
1 "1" "0" "2" "2" "0"
18 "1" "1" "1" "1" "0"
41 "1" "1" "1" "1" "1"
1 "1" "1" "1" "NA" "0"
3 "1" "1" "1" "NA" "1"
112 "1" "2" "0" "0" "0"
340 "1" "2" "0" "0" "1"
4 "1" "2" "0" "0" "2"
2 "1" "2" "0" "NA" "1"
9 "1" "NA" "1" "1" "0"
12 "1" "NA" "1" "1" "1"
1 "1" "NA" "1" "1" "NA"
1 "1" "NA" "1" "NA" "1"
1 "1" "NA" "2" "NA" "1"
2 "2" "0" "2" "2" "0"
27 "2" "1" "1" "1" "0"
94 "2" "2" "0" "0" "0"
1 "2" "2" "0" "0" "1"
1 "2" "2" "0" "0" "NA"
6 "2" "NA" "1" "1" "0"
1 "2" "NA" "1" "NA" "0"
1 "NA" "2" "0" "0" "1"


Thanks,
A
Reply With Quote