grep for special wordsUsing grep command and backreferencinggrep for capital wordsIssue with real-time log...

SOQL injection vulnerability issue

Short story about a potato hotel that makes its guests into potatoes throughout the night

Why most footers have a background color as a divider of section?

Would an object shot from earth fall into the sun?

Is there a pattern for handling conflicting function parameters?

How to interpret the challenge rating of creatures?

Caro-Kann c4-c5 push

How to identify whether a publisher is genuine or not?

Can I cast Death Ward on additional creatures without causing previous castings to end?

Garage door sticks on a bolt

How dangerous is a very out-of-true disc brake wheel?

A word that refers to saying something in an attempt to anger or embarrass someone into doing something that they don’t want to do?

The answer is a girl's name (my future granddaughter) - can anyone help?

What does "execute a hard copy" mean?

Looking for circuit board material that can be dissolved

IEEE 754 square root with Newton-Raphson

Did the Soviet army intentionally send troops (e.g. penal battalions) running over minefields?

How does Fae of Wishes / Granted work in a THG limited event?

Get the exact size of files retrieved by find output

Bothered by watching coworkers slacking off

What does the triangle look like in this diagram?

Why do personal finance apps focus on outgoings rather than income

Wondering why they used ultrafast diodes in a 50 or 60Hz bridge?

Isn't the detector always measuring, and thus always collapsing the state?



grep for special words


Using grep command and backreferencinggrep for capital wordsIssue with real-time log inspecting piping tail, grep and cutHelp with regular expression in grepgrep two conditions, one negated, without a pipeline?How can I do a binary search of a text file for a specific character string?Redirection and piping for greppingGrep words with special symbolsgrep pattern syntax for finding wordsDelete all lines which don't have n characters before delimiter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}








0















I've recently got into linux for my class and I've been trying to answer this question and i think i have most of it, havent had a chance to test it yet because i did not make the file, but i will be testing it once i think i finished it, heres the question



Write “grep” regular expressions that pipe to wc to
count the number of lines returned from the file "/usr/share/dict/canadian english-small" for the following:
a. All lines exactly 3 characters long
b. Any line starting with "z", ending with "o" and exactly 4 characters long
c. All lines that contain the word “that” (case sensitive)
d. All lines that contain the word "here" but not "there" (case insensitive)
e. An 8 character word, where the first character must be an uppercase letter and cannot be a lower case
character or number. The remaining characters can be letters or numbers but must have one apostrophe in it
in the 7th character and no other special characters.


Heres what i have as of now



a)  grep -x “.{3,3}” /usr/share/dict/canadian-english-small|wc -l
b) grep (cant seem to figure it out)
c) grep “that” /usr/share/dict/canadian-english-small|wc -l
d) grep -wi “here” /usr/share/dict/canadian-english-small|wc -l
e) grep (cant seem to figure it out)


Im still trying to learn, so any extra information here and there would be very helpful! thanks!










share|improve this question







New contributor



Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • There's no way to tell without knowing the contents of the file.

    – Nasir Riley
    11 mins ago


















0















I've recently got into linux for my class and I've been trying to answer this question and i think i have most of it, havent had a chance to test it yet because i did not make the file, but i will be testing it once i think i finished it, heres the question



Write “grep” regular expressions that pipe to wc to
count the number of lines returned from the file "/usr/share/dict/canadian english-small" for the following:
a. All lines exactly 3 characters long
b. Any line starting with "z", ending with "o" and exactly 4 characters long
c. All lines that contain the word “that” (case sensitive)
d. All lines that contain the word "here" but not "there" (case insensitive)
e. An 8 character word, where the first character must be an uppercase letter and cannot be a lower case
character or number. The remaining characters can be letters or numbers but must have one apostrophe in it
in the 7th character and no other special characters.


Heres what i have as of now



a)  grep -x “.{3,3}” /usr/share/dict/canadian-english-small|wc -l
b) grep (cant seem to figure it out)
c) grep “that” /usr/share/dict/canadian-english-small|wc -l
d) grep -wi “here” /usr/share/dict/canadian-english-small|wc -l
e) grep (cant seem to figure it out)


Im still trying to learn, so any extra information here and there would be very helpful! thanks!










share|improve this question







New contributor



Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • There's no way to tell without knowing the contents of the file.

    – Nasir Riley
    11 mins ago














0












0








0








I've recently got into linux for my class and I've been trying to answer this question and i think i have most of it, havent had a chance to test it yet because i did not make the file, but i will be testing it once i think i finished it, heres the question



Write “grep” regular expressions that pipe to wc to
count the number of lines returned from the file "/usr/share/dict/canadian english-small" for the following:
a. All lines exactly 3 characters long
b. Any line starting with "z", ending with "o" and exactly 4 characters long
c. All lines that contain the word “that” (case sensitive)
d. All lines that contain the word "here" but not "there" (case insensitive)
e. An 8 character word, where the first character must be an uppercase letter and cannot be a lower case
character or number. The remaining characters can be letters or numbers but must have one apostrophe in it
in the 7th character and no other special characters.


Heres what i have as of now



a)  grep -x “.{3,3}” /usr/share/dict/canadian-english-small|wc -l
b) grep (cant seem to figure it out)
c) grep “that” /usr/share/dict/canadian-english-small|wc -l
d) grep -wi “here” /usr/share/dict/canadian-english-small|wc -l
e) grep (cant seem to figure it out)


Im still trying to learn, so any extra information here and there would be very helpful! thanks!










share|improve this question







New contributor



Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I've recently got into linux for my class and I've been trying to answer this question and i think i have most of it, havent had a chance to test it yet because i did not make the file, but i will be testing it once i think i finished it, heres the question



Write “grep” regular expressions that pipe to wc to
count the number of lines returned from the file "/usr/share/dict/canadian english-small" for the following:
a. All lines exactly 3 characters long
b. Any line starting with "z", ending with "o" and exactly 4 characters long
c. All lines that contain the word “that” (case sensitive)
d. All lines that contain the word "here" but not "there" (case insensitive)
e. An 8 character word, where the first character must be an uppercase letter and cannot be a lower case
character or number. The remaining characters can be letters or numbers but must have one apostrophe in it
in the 7th character and no other special characters.


Heres what i have as of now



a)  grep -x “.{3,3}” /usr/share/dict/canadian-english-small|wc -l
b) grep (cant seem to figure it out)
c) grep “that” /usr/share/dict/canadian-english-small|wc -l
d) grep -wi “here” /usr/share/dict/canadian-english-small|wc -l
e) grep (cant seem to figure it out)


Im still trying to learn, so any extra information here and there would be very helpful! thanks!







linux grep






share|improve this question







New contributor



Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question







New contributor



Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question






New contributor



Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 35 mins ago









AmrAmr

1




1




New contributor



Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Amr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • There's no way to tell without knowing the contents of the file.

    – Nasir Riley
    11 mins ago



















  • There's no way to tell without knowing the contents of the file.

    – Nasir Riley
    11 mins ago

















There's no way to tell without knowing the contents of the file.

– Nasir Riley
11 mins ago





There's no way to tell without knowing the contents of the file.

– Nasir Riley
11 mins ago










0






active

oldest

votes













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});







Amr is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded
















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f543760%2fgrep-for-special-words%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes









Amr is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded

















Amr is a new contributor. Be nice, and check out our Code of Conduct.













Amr is a new contributor. Be nice, and check out our Code of Conduct.












Amr is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f543760%2fgrep-for-special-words%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...