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 / uttamjit
You can use the below command:
grep -o '[[0-9]*:[0-9]*:[0-9]*' infile
where infile is the input file to grep command.
| Is This Answer Correct ? | 16 Yes | 12 No |
Post New Answer View All Answers
What are the general commands in using unix os for a beginner?
Can you enlist some commonly used network commands?
What is difference between grep and find command in unix?
What is the search command in unix?
Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?
What does this command do,"$more readme.txt“?
What does sed command do in unix?
What happens when we execute a unix command?
How can we use grep command in unix?
How do you grep recursively?
How do I use nslookup?
Is command prompt unix?
What does the “echo” command do?
What is unix command line?
Why is grep called grep?