-- Original Message -- From: Shakthi Kannan <[email protected]> To: ILUG-C <[email protected]> Date: Mon, 14 Dec 2009 15:53:15 +0530 Subject: Re: Re: [Ilugc] script to read special characters Hi, --- On Mon, Dec 14, 2009 at 3:04 PM, Mahalingam Subramaniam <[email protected]> wrote: | Sorry, it is not helping me either. \-- It would greatly help if you pasted your code, rather than the above. --- | The ultimate aim is to read and count special characters(?) but pointing to variables of | alphabet does not solve the issue. Is there any other method by which it can be resolved?. \-- That is exactly what the mentioned does: * Q=0, initializes the counter variable for '?' * [ "$c" == "?" ] && (( Q++ )), increments the variable Q for every occurence of '?'. * echo "Q = $Q", prints the number of occurrences of '?'. SK -- Shakthi Kannan http://www.shakthimaan.com I shall highly appreciate your help rendered in resolving this issue. However, the result to be displayed on the screen shoudl be such that the number of repetition of special characters should be displayed/ indicated on the screen alongwith alphabets. like A,G,C,T,?,-, *......etc. sometimes there may be an empty space between two characters. Hence, I had to modify at the end as echo "$? or $* = $P or $Q" The end result to be displayed on the screen shall be: A=57 G=43 C=16 T=12 ?=8 -=14 *=9 .....etc..... With thanks & regards s.mahalingam
_______________________________________________ To unsubscribe, email [email protected] with "unsubscribe <password> <address>" in the subject or body of the message. http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
