Help Please


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help Please
# 1  
Old 09-05-2005
Help Please

Hi,

Is there anyway I could get the count of some strings (I only know the position of the string, I don't know the exact strings) Say for example I need to get a count of some 8 strings which will be starting from position 15 and is 15 characters in length.

Is there anyway of doing this in command line, (without writing script). I am very new to this, please help

Many Thanks,
# 2  
Old 09-05-2005
MySQL

Try :

more filename | cut -c15-29 | uniq -c
# 3  
Old 09-05-2005
Hi,

I need to get the count of each and every uniq string? Any help is much appreciated.

Cheers
# 4  
Old 09-05-2005
Hi,

That's perfect. I just need to sort the file, it works just fine.

Many Thanks for that.
# 5  
Old 09-05-2005
Lightbulb

but why you need to sort it at all if you only want uniqe counts?
# 6  
Old 09-05-2005
Thought uniq won't work properly if the file is not sorted.
 
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question