Patterns i want to match is 0300 0301 0303. i want to count different Codes occurances for each of these pattern. for example for 0300 Code 22 occurs 2 times and 0 occurs 1 time. output should be like that
300:
22 2
0 1
0301:
39 1 etc
I have large no of patterns so i have to save them in array and then match them . Please can someone provide with the shell script urgently.
it works fine but matching Patterns may not be 4 digit in lenght that may be 2,5 or 7 etc. Alse file is csv and much more colums may be present between code 22 etc and No 0300... . I will much appreciate your help
i have written the script in cshell but there is another problem that when define variables in a file then run the file error ocurrs something like
missing )
e:g >>cat abc
set a =0;
set xyz =(1 2 3 4 5 6);
>> chmod 777 abc;
>>abc
missing parameter )
how can i correct this. I will much appreciate your help.