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
What do chown command do?
Are you in or at the office?
What is the use of the tee command?
What do know about tee command and its usage?
Write a command that will display files in the current directory, in a colored, long format.
Can you enlist some commonly used network commands?
Which command is used to copy files?
What is pipe command in unix?
What is the use of awk command in unix?
Explain ‘system calls’ with respect to unix commands?
How do I delete files from command prompt?
Who command in unix?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
What is the general format of unix command syntax?
What are filter commands in unix?