I am taking an online unix class and I don't have much knowledge about it. I know how to make folders and navigate them to an extent, but I need to do this:
Enter a command to see 6-letter words that begin with a "b" (uppoer or lower-case) and have an "e" as its third letter.
I have been reading and I have no idea how to do this. Please someone help.
Can someone help me with a Unix Command?
egrep '\%26lt;[Bb].e...\%26gt;' filename
the greater than and less than symbols are word anchors.
Reply:Assuming you have word list in a text file called words.txt, for example (one word per line), the following command will do that:
egrep '^[Bb].e...$' words.txt
clinton cards
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment