Hi All, Can you please let me know how to grep for a
particular pattern in unix. I want to print the dates from
the file exp.txt. the date pattern is DD:MM:YYYY, I just
want to print all the dates from the file exp.txt.

Answer Posted / shweta

grep -v "[Aa-Zz]" exp.txt

Is This Answer Correct ?    2 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Enumerate some of the most commonly used network commands in unix?

615


What are reported commands?

562


Is ‘du’ a command? If so, what is its use?

633


What is the use of cut command in unix?

690


How do you grep a case insensitive?

538






How many unix commands are there?

625


Why is awk called awk?

575


Which command is used to restrict incoming messages?

592


What command is used to switching between users in unix?

560


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

795


Is command prompt unix?

578


Write a command to display a file’s contents in various formats?

620


How does shebang work?

585


What is grep in bash?

584


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

587