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 / mad
Small modification required
grep -o '[0-9]*:[0-9]*:[0-9]*' infile
| Is This Answer Correct ? | 5 Yes | 12 No |
Post New Answer View All Answers
How do I search a whole word in vim?
what is the advaantage of each user having its own copy of the shell?
how to sort the content of the file based on numeric values
What does this command do? Cat food 1 > kitty
What does pipe () return?
What is a command and examples?
Differentiate cat command from more command.
Write a command to kill the last background job?
What is the significance of the 'tee' command?
What is the use of cut command in unix?
How to display no of records in oracle using unix command?
What is grep short for?
What does the metacharacter mean?
How do I use grep to find a file?
What is the use of the command 'ls -x chapter[1-5]' ?