I'm trying to look at a file and find 6 or more consecutive consonants (everything except a vowel). However I have a hidden $ character at the end of each ...
-
Ignoring Hidden Characters
I'm trying to look at a file and find 6 or more consecutive consonants (everything except a vowel). However I have a hidden $ character at the end of each line in the file. For some reason I can't reference to it in any of the pattern searching commands.
For example: grep '[^aeiouAEIOU$]\{6,\}' file| more
This command returns words that contain 5 consonants at the end (because it interprets the hidden $ as not a vowel). How can I make it ignore the hidden character? Or more specifically how do I refer to the hidden character in my pattern searches?
Thank you.
-
Just Joined!

Originally Posted by
whocares357
I'm trying to look at a file and find 6 or more consecutive consonants (everything except a vowel). However I have a hidden $ character at the end of each line in the file. For some reason I can't reference to it in any of the pattern searching commands.
For example: grep '[^aeiouAEIOU$]\{6,\}' file| more
This command returns words that contain 5 consonants at the end (because it interprets the hidden $ as not a vowel). How can I make it ignore the hidden character? Or more specifically how do I refer to the hidden character in my pattern searches?
Thank you.
Not sure what you mean by 'hidden' $ character. Have you tried escaping it?
Code:
grep '[^aeiouAEIOU\$$]\{6,\}' file| more Edit: Can this trailing character be removed?
Last edited by barriehie; 11-04-2010 at 02:14 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules