append an output file with two columns

Hi All, can you help me with this:
grep XXX dir/.txt|wc -l > newfile.txt - this put the results in the newfile.txt, but I want to add another column in the newfile.txt, string 'YYYYY', separated somehow, which corresponds on the grep results?
For example grep will grep XXX dir/
.txt|wc -l > newfile.txt will look like:

ABVC

and I want to add the string 'YYYYY' in order to become:

ABVC YYYYY

Thanks in advance!
Atanas

Try...

 
grep XXX dir/*.txt|awk 'END{print NR,"YYYYY"}' > newfile.txt 

And how about just this...

 
awk '/XXX/{Cnt++}END{print cnt,"YYYYY"}' dir/*.txt > newfile.txt
grep XXX dir/*.txt|wc -l 

does not produce ABVC

Could you be more specific about what you are looking for?

Sorry scrutiniser, my mistake...ABVC should be XXX
Thanks malcomex999, but it doesn't work. When I try with the first statement, below is exactly what I write:
grep Event ME_MOBILEROAM_POST_20101015*|wc -l|awk 'END{print NR,"YYYYY"}' > counter.txt - the result is 1 YYYYY, but should be 1792 YYYYY, it seems that wc -l doesn't work
Second statement:
awk '/Event/{Cnt++}END{print cnt,"YYYYY"}' ME_MOBILEROAM_POST_20101015* > counter.txt - the result is YYYYY, but should be 1792...actually I can't see where to count here....may be I explained not so good what I need ...:frowning:
Atanas

Watch out for red once above and figure it out...

Thanks a lot!!