阅读背景:

如何使用shell变量使Grep更少贪婪?

来源:互联网 

I have been polishing up my grep skills with a particular problem I have found. Basically it goes like this. I have a local file with words from a dictionary. The user will pass in a word and the script will find all words that can be made with letters from that word. The catch is, the words must be at least 4 characters long and you can only use as many letters as the user passes in. So if I passed in a word like "College" clee and cell would be acceptable words but not words like cocco because yes it contains letters from the word but college only has 1 o and 1 c. Here is my regular expression thus far.I have been polishing up my grep skills with a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: