On Mon, Dec 14, 2009 at 12:58 PM, Mahalingam Subramaniam <[email protected]>wrote:
> The objective is to write a bash shell script to read and count special > characters along with normal alphabetic characters for which I seek your > help in finding solution. The sample script for reading and counting number > of characters present in INPUT text file is attached. The special characters > exclusinvely are "?, - ". I am able to fulfill my requirement only for > the alphabetic characters and not for the special characters. The help in > this regard shall highly be appreciated & regarded. > Few hints: I would love to correct your program, but would advice you to google. There are some advantages of this: You willl stumble on something interesting during the course of your searh which would be a good hack experiment. For eg, the Q that you have asked is a very fundamental Q and there are truck loads of informations all around. Also, as of now you have not been thinking about non-english characters , and probably you might have to accomodate that in the future - how will you handle it then? Also, you might want want to check whether there are any already existing *nix commands that can help you in here. (this is one is on the programming style) Also, the special characters list can increase or decrease in the future, do you want to change it all over the program? Is there a better paradigm by which you can do this? -V- PS: Sending code to a mailing list wouldnt be a good move, especially if your code exceeds n lines(n>10 , according to me). _______________________________________________ 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
