answersLogoWhite

0


Best Answer

The term "grep" stands for "global regular expression parser". It's used to search a character stream for items matching a specific pattern.

The term "sed" stands for "stream editor". It's also capable of searching a character stream for items matching a pattern, but whereas grep just finds them, sed then actually does something to them to change them.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between the grep and sed commands in Linux?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between grep and sed?

The major difference between SED GREP and AWK is that SED allows you to find a pattern address. AWK only allows you to find a numeric address.


What is the difference between sed grep and awk?

The major difference between SED GREP and AWK is that SED allows you to find a pattern address. AWK only allows you to find a numeric address.


What utility is used to search for a particular string within a file or group of files in linux?

Grep


What is the difference of grap fgrap and egrad commands of unix?

The difference between the grep family of utilities is based on what and how they search for patterns, from simple to complex. This also determines the speed at which they can analyze the patterns. fgrep works on a single string in a file grep uses regular expressions (one) to find patterns in a file or files egrep is an extended version (most complex) that finds multiple patterns in a file or files by using multiple regular expressions.


How can you search a file for keywords in Linux?

grep keyword filename Use egrep or fgrep for multiple keywords


In Linux this connects the output of the first command with the input of the second command?

You would use a pipe. For example. ls | grep cool The output of ls(the list of files in your current directory) is given to grep. Grep then finds and prints file names that include the word cool in them.


Cmd commands in Linux 5.0 like lsmkdircat etc?

There are many different commands available in Linux. Some of the most basic are:* ls - lists the contents of a directory * dir - same as above but with escaped spaces * mv - move a file * rm - delete a file (semi-permanent) * cat - reads a file * less - used to pipe lengthy output from a command so that it can be scrolled through. Use like ls | less. * cp - copy files. cp file1 file1copy* grep - search for text in a file. Can also be used to search for words in a command output. Example: ls | grep partoffilename


How could you check to see if a user account is already present on a Linux system?

$ cat /etc/passwd | grep username


Where can one find information about UNIX grep command?

The grep command is used to search for text, or lines containing certain words or strings of words. Stackoverflow, techonthenet, linux are a few sites that tell more about this command


How do you find vowels in textfile in Linux?

grep -in '[aeiou]' filename.txt -i means to ignore case and -n will give you the line number that the vowel occurs in.


What is man command?

The man command of the Linux operating system is the system's documentation pager. Each page argument given to man is normally the name of a program, utility or function. For example, to see the reference manual of the grep program: man grep


How do you set Linux aliases for hard to remember commands?

edit ~/.bashrc file and add the alias you want : some more usefull aliases : alias l='ls -la' alias ls='ls --color=auto' alias dir='dir --color=auto' alias vdir='vdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto'