Give a regular expression that finds two things, try to
come up with regular expressions that find each
individually using "egrep" command?
Answers were Sorted based on User's Feedback
Answer / manikantan t s
egrep -e <expresseion 1> -e <expression 2> <file name>
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / shammi
Suppose yu have file name k.txt
naf@warsteiner:~:>cat k.txt
My name is harish
My name is Mark
Now naf@warsteiner:~:>egrep '(harish|Mark)' k.txt
My name is harish
My name is Mark
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / niranjan
Gud command egrep but it not available in all unix flaviours.
grep -e option do the same as egrep
syntax:-
egrep 'pattern1|pattern2|pattern3' filename
grep -e 'pattern1' -e 'pattern2' -e 'pattern3' filename
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / linuxdemon(vjsujay@gmail.com)
vjsujay@vjsujay-desktop:~/test$ cat jsk
cake
coke
vjsujay@vjsujay-desktop:~/test$ egrep 'c(a|o)ke' jsk
cake
coke
| Is This Answer Correct ? | 1 Yes | 2 No |
How do you find which version and name of unix you are using at the command prompt?
What is the comma to display different lines that are found when compare two files?
Briefly, how do you install Oracle software on UNIX.
Sorry to all Technical person for mistake of Question. Now i am post currect question Why copied file permission is changed in destination. When i give all permission i.e 777 to file and copy that to other location in destination the permission is 755. But if give permission 555 in destination that file permission is 555 and if give permission 444 to file after copy in destination the file permission is 444. These all are happening in normal user. How the umask value is calculate here really i am not understand. Please write the proper answer. Thanks in Advance
What does the metacharacter mean?
Explain command to display different lines that are found when compare two files?
How do you copy a directory with many files and folders into another directory?
what is the default permission for /etc/shadow file in UNIX
What is the unix command to confirm a remote host is alive or not?
What is the difference between udp and tcp?
distinguish between physical addresses and logical address?
23 Answers College School Exams Tests, CTS, Infosys, SAX, TATA, TCS,
What is FIND, GREP and SED ? Could you please give me the difference between all the three? Where we use this commnands?