Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What are the differences among grep. Egrep and fgrep? Grep- the main search prog

ID: 3795120 • Letter: W

Question

What are the differences among grep. Egrep and fgrep? Grep- the main search program on Unix-like systems which can search for any type of string on any file or list of files or even output of any command. eGrep another version of grep or the Extended grep. This version of grep is efficient and fast when it comes to searching for a regular expression pattern as it treats meta-characters as is and doesn't substitute them as strings like in grep frgrep-another version of grep which is fast in searching when it comes to search for the entire string instead of regular expression as it doesn't recognize the regular expressions, neither any meta-characters. For searching any direct string, this is the version of grep which should be selected. How to search for files by file names? And how to search for files with specific texts in content? How to search for file names by file names - find -names find-iname 'filename" There area also other ways to do this How to search for files with specific texts in content $ grep -H -r "text that you are searching for "/hone/ton (directory path) What are the default separators for utility awk and sort? And how to define a new separator for them respectively in the command?

Explanation / Answer

[3] For AWK default field separator is whitespace.

For Sort : Use char as the field separator character. If -t is not specified, <blank>s shall be used as default field separators; each maximal non-empty sequence of <blank>s that follows a non- <blank> shall be a field separator.

To define new separator

[1] AWK --> FS=":";

[2] SORT -->explicitly set via -t

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote