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 do chgrp command do?
What is the command to find maximum memory taking process on the server?
Which unix command lists files/folders in alphabetical order?
Is grep faster than awk?
How do I use grep to search for a file?
What is a command and examples?
What are the commands in UNIX to list the files in a Directory?
What are grep patterns?
What do know about tee command and its usage?
What does touch command do in unix?
What do chmod command do?
What is ‘ps’ command for?
what is the advaantage of each user having its own copy of the shell?
What is the function of grep command in unix?
What will the following command do?