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 is in grep command?
What is grep in bash?
How do I use nslookup?
Describe the usage and functionality of the command rm –r * in unix?
Name the unix command to find how many days the server has been up.
Are you in or at the office?
How do you grep a case insensitive?
Which command is used to copy files?
What is the nmap command?
What is used to type command?
What are the differences among a system call, a library function, and a unix command?
What is the command to find maximum memory taking process on the server?
What does the command '$ls | wc –l > file1' do?
Explain ‘library functions’ with respect to unix commands?
What is ‘ps’ command for?