With suitable examples differentiate between grep and fgrep command.

1 Answer

Answer :

grep command
fgrep command
grep is an acronym that stands for "Global Regular Expressions Print".
fgrep is an acronym that stands for "Fixed-string Global Regular Expressions Print".
grep is a program which scans a specified file or files line by line, returning lines that contain a pattern. A pattern is an expression that specifies a set of strings by interpreting characters as metacharacters.
fgrep (which is the same as grep - F) is fixed or fast grep and behaves as grep but does NOT recognize any regular expression meta-characters as being special. The search will complete faster because it only processes a simple string rather than a complex pattern.
For example the asterisk meta character (*) is interpreted as meaning "zero or more of the preceding element". This enables users to type a short series of characters and meta characters into a grep command to have the computer show us what lines in which files match.
For example, if I wanted to search my .bash_profile for a literal dot (.) then using grep would be difficult because I would have to escape the dot because dot is a meta character that means 'wild-card, any single character':
Syntax: grep [OPTIONS] PATTERN [FILE….]
Syntax: fgrep [-b] [-c] [-h] [-i] [-1] [-n] [- s] [-v] [-x] [ -e pattern_list] [ -f pattern-file] [pattern] [file]
Example: image
Example: 
fgrep “support” myfile.txt
Search for “support” in the myfile.txt

Related questions

Description : The command which transcribes the standard input to the standard output and also makes a copy of the same in a file is A. tee B. tr C. sort D. grep E. None of the above

Last Answer : A. tee

Description : Which of the following is not a communication command. A. write B. mesg C. mail D. grep E. None of the above

Last Answer : D. grep

Description : Which command is used to extract specific columns from the file? A. cat B. cut C. grep D. paste E. None of the above

Last Answer : B. cut

Description : Which command is used to display the top of the file? A. cat B. head C. more D. grep E. None of the above

Last Answer : B. head

Description : Which symbol will be used with grep command to match the pattern pat at the beginning of a line? A. ^pat B. $pat C. pat$ D. pat^ E. None of the above

Last Answer : A. ^pat

Description : What does the following command do? grep −vn abc x (A) It will print all of the lines in the file x that match the search string abc (B) It will print all of the lines in file x that do not ... (D) It will print the specific line numbers of the file x in which there is a match for string abc

Last Answer : (A) It will print all of the lines in the file x that match the search string “abc”

Description : Differentiate between addition and condensation polymerisation process with suitable examples.

Last Answer : Addition polymerization  Condensation polymerization 1)the polymerization reaction involves the joining of unsaturated monomers by breaking of bonds in a chain like manner without loss of any by ... thermosetting polymers Example: pvc(poly vinyl chloride) Example: formaldehyde

Description : Batch grep

Last Answer : Are you talking about a bash script or a windows batch file? With a bash script, it doesn’t do anything majorly fancy, it can just make doing a series of repeated commands easier.

Description : Which of the following commands is used to update access and modification times of a file? A. grep B. wc C. touch D. cat E. None of the above

Last Answer : C. touch

Description : Explain PAN with suitable diagram. Differentiate between PAN and CAN.

Last Answer : A personal area network(PAN) is a network organized around an individual person. A PAN can also be used for communication among personal devices themselves(interpersonal communication).PAN network can be ... used for personal communication. 4. CAN is mainly used for corporate campuses.

Description : Pick out the wrong statement. (A) Complete unity of command exists in a line organisation (B) Line organisation is net suitable for expansion and growth of an industry (C) In line and staff organisation, "line" executes and "staff directs (D) None of these

Last Answer : C) In line and staff organisation, "line" executes and "staff directs

Description : Explain the command line arguments with suitable example.

Last Answer : Java Command Line Argument: The java command-line argument is an argument i.e. passed at the time of running the java program. The arguments passed from the console can be received in the java program ... [0]); } } compile by > javac CommandLineExample.java run by > java CommandLineExample sonoo

Description : Differentiate between Transported soil and In situ soil, quoting a suitable example for each. -Geography

Last Answer : Transported Soil—If a soil is carried else where at the place of rest by the agents of gradation, it is transported soil e.g. Alluvial Soil. In situ Soil—If the soil remains at the place of its origin it is called in situ soil. e.g. Black Soil.

Description : Differentiate between and tag with suitable example. -Technology

Last Answer : stands for Ordered List which can be either numerical or alphabetical while stands for Unordered List which can be either ... AND OUTPUTCODEHobbiesprogrammingDramaticsCODEHobbiesGamesProgrammingDramaticsOUTPUTHobbies1. Games2. Programming3. DramaticsOUTPUTHobbies1. Games2. Programming3. Dramatics

Description : Differentiate between Web sites and Web pages with suitable example of each. -Technology

Last Answer : Thedifference between awebsiteand aweb pageis that awebsiteis a collection ofwebpages with information on a subject, and aweb pageis a smaller part of a largerwebsiteusually containing more specific information. If awebsitewere a book, then awebpagewould be a chapter in that book.

Description : Differentiate between Websites and Webpages with suitable example of each. -Technology

Last Answer : Using the same book analogy, while awebpageis apagefrom a book, awebsiteis the book itself. It is a collection of thepagesthat share a common thread. Similarly, all thewebpagesof yourwebsitecome together to form yourwebsite.

Description : Differentiate between economic growth and economic development. Give examples -SST 10th

Last Answer : Economic DevelopmentEconomic GrowthImplicationsEconomic development implies an upward movement of the entire social system in terms of income, savings and investment along with progressive changes in socioeconomic ... changes in the economyGrowth is concerned with increase in the economy's output

Description : Differentiate between metallic and non-metallic minerals with examples. -SST 10th

Last Answer : Difference between metallic and non-metallic minerals: 1. Metallic minerals are usually found in igneous rocks while non-metallic minerals are found in sedimentary rocks. 2. Metallic minerals have raw metal and have ... own while non-metallic have no metal in it and don't have a shine of its own.

Description : Differentiate between ferrous and non-ferrous minerals with examples. -SST 10th

Last Answer : Difference between ferrous and non-ferrous minerals: 1. Ferrous minerals have iron in it while non-ferrous do not. 2. Ferrous minerals are magnetic in nature while non-ferrous are not 3. Example of ferrous: Nickel, Manganese Example of non-ferrous: Lead, Copper

Description : Differentiate between conventional and non-conventional sources of energy with examples. -SST 10th

Last Answer : Difference between conventional and non-conventional sources of energy: 1. Conventional sources are mostly non-renewable sources of energy while non-conventional sources are renewable. 2. Conventional ... Petroleum. Natural Gas Example of non-conventional sources: Solar energy, Wind Power, Biogas

Description : Differentiate between sectional interest groups and public interest groups with examples. -SST 10th

Last Answer : Difference between sectional and public interest groups: 1. Sectional interest groups are concerned about a particular section of the society while public interest groups think of the good ... unions, business association etc Examples of public interest groups: FEDECOR, human rights organization.

Description : Differentiate between endemic species and rare species. Give examples. -SST 10th

Last Answer : Extinct species are those species which are not found after searches of known or likely areas where they may occur. A species may be extinct from a local area, region, country, continent ... to protect endangered species, for example, hunting of such animal is banned under Wildlife Protection Act.

Description : Differentiate between the public sector and private sector by giving examples. -SST 10th

Last Answer : In the public sector, the government owns most of the assets and provides all the services. In the private sector, ownership of assets and delivery of services is in the hands of private ... Iron and Steel Company Limited (TISCO) and Reliance Industries Limited (RIL) are in private sector.

Description : Differentiate between metallic and non metallic minerals with examples. -SST 10th

Last Answer : Difference between Metallic and Non- metallic Minerals

Description : Differentiate between ‘Coming Together Federation’ and ‘Holding Together Federation’, with examples. -SST 10th

Last Answer : Difference between Coming Together Federation' and Holding Together Federation': (i) Coming Together federations are formed when independent states come together to form a bigger state and ... , Switzerland and Australia. Examples of holding Together federations - India, Spain and Belgium.

Description : Differentiate the following and give examples of each (a) Innate and acquired immunity (b) Active and passive immunity -Science

Last Answer : (a) Innate & acquired immunity Innate immunity, also called inherent, natural, non specific immunity, comprises all those defence elements with which an individual is bom & which are ... Whereas passive immunity is conferred by transfer of immune products like antibodies etc. from other individual

Description : Differentiate between mixture and compounds by giving appropriate examples. -Science

Last Answer : Mixtures do not have meting or boiling point, but compounds have fixed melting and boiling point. Examples of mixtures are Alloys like brass, bismuth, chromium, oceanic water (salt and water), mixtures ... while Sodium Chloride, Baking soda, Methane, Salt, etc., are the examples of the compounds.

Description : Differentiate between Active and Passive Immunity along with examples. 

Last Answer : Active Immunity Passive Immunity  1) Antigens are injected in the human body as result antibodies are formed. 2) it develops slowly 3) it remains for longer time 4) the treatment is ... therapeutic 5) immunological memory is absent 6) Useful for immune-deficient host 7) Ex: Sera

Description : What is a command button ?

Last Answer : The OK, Cancel, Help, etc. buttons in the dialog box are called command buttons. Clicking on the OK button using various options in the dialog box takes effect on the Change or other selected ... the dialog box. Click on the Help button to get information about the various buttons and options.

Description : In a relational database, this is a data structure that organizes the information about a single topic into rows and columns. 1) Block 2) Record 3) Tuple 4) Table 5) Command line interface

Last Answer : Answer :4

Description : What do you call a program in execution? a) Command b) Process c) Task d) Instruction

Last Answer : Answer: b Explanation: Option Process is correct. A program is a set of instructions. A program in execution is called a process

Description : What do you call a a specific instruction designed to do a task? a) Command b) Process c) Task d) Instruction

Last Answer : Answer: a Explanation: A program is a set of instructions. A command is given to do a specific job. A program in execution is called a process

Description : A set of microinstructions for a single machine instruction is called ___________ a) Program b) Command c) Micro program d) Micro command

Last Answer : Answer: c Explanation: For every micro-operation, a set of microinstructions are written which indicate the control signals to be activated. A set of microinstructions is a micro program. The address of the next microinstruction is given by a Microprogram counter

Description : PCL stands for _________ A. Print Code Language B. Printer Code Language C. Printer Character Language D. Printer Command Language

Last Answer : D. Printer Command Language

Description : The control unit controls other units by generating control and _______ A. Command Signals B. Timing signals C. Transfer signals D. None of the Above

Last Answer : B. Timing signals

Description : The Command to access the memory or the I/O device is carried by ______ A. Address Bus B. Data Bus C. Control Bus D. None of the Above

Last Answer : C. Control Bus

Description : _____toolbar contains short cuts to some of the most frequently used command found under the FORMAT menu item: a) Status Bar b) Formatting Toolbar c) Standard Toolbar d) None of These

Last Answer : b) Formatting Toolbar

Description : In MS - Word ever command is available in: a) Printer b) Menu c) Desktop d) None of The Above

Last Answer : b) Menu

Description : What is the difference between cold booting and warm booting: a) Cold Booting uses a floppy for booting while warm booting uses a hard disk for booting b) Cold booting is starting the computer from the power ... CAD command or reset button when it hangs c) Both of The Above d) None of The Above

Last Answer : b) Cold booting is starting the computer from the power off position and warm booting is the restarting the computer with CAD command or reset button when it hangs

Description : Which command is used to quit power point: a) Alt + F4 b) Alt + Shift + F4 c) F4 d) Either (a) or (b) e) None of The Above

Last Answer : a) Alt + F4

Description : In MS - Word every command is available in: a) Printer b) Menu c) Letter d) None of The Above

Last Answer : b) Menu

Description : What is the use of sections in a word document: a) To divide the document into parts so that each part may be independently printed when the print command is given. b) To divide the document into ... document into parts and then allow formatting of each part the way you want. d) None of The Above

Last Answer : To vary the layout of a document within a page or between pages by dividing the document into parts and then allow formatting of each part the way you want.

Description : What is a shell: a) It is a hardware component b) It is a command Interpreter c) It is a part in computer d) None of The Above

Last Answer : b) It is a command Interpreter

Description : What is the significance of a faded (dimmed) command in a pull-down menu? a) The command is not currently accessible b) A dialog box appears if the command is selected c) A help window ... the command is selected d) There are no equivalent keystrokes for the particular command e) None of these

Last Answer : d) There are no equivalent keystrokes for the particular command

Description : The Assistant is -. 1) an application that allows you to take notes and save them in a file 2) an animated character that provides help and suggestions 3) a button on the standard Toolbar that executes the Print command 4) a collection of frequently misspelled words in a dictionary file

Last Answer : 2) an animated character that provides help and suggestions

Description : To find and load a file that has been saved - 1) select the Close command 2) select the New command 3) select the Save command 4) select the Open command

Last Answer : 4) select the Open command

Description : For creating a document, you use ..... command at File Menu. 1) Open 2) Close 3) New 4) Save

Last Answer : 3) New

Description : Which file in MS-DOS contains internal commands that are loaded during Booting process? 1) IO.SYS 2) MSDOS.SYS 3) COMMAND.COM 4) CONFIG.SYS

Last Answer : 4) CONFIG.SYS

Description : Which switch should be used in the DIR command to view files in all directories ? 1) /P 2) /W 3) /S 4) /L

Last Answer : 3) /S

Description : What is the switch that is used to make sure that the COPY command copied files correctly 1) /A 2) /C 3) /S 4) /V

Last Answer : 4) /V