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
Which command can you use to find the currently running process in unix server?
What does the md command do?
What is the command to find maximum memory taking process on the server?
What are the commands in UNIX to list the files in a Directory?
How do you grep recursively?
What is the use of tee command?
What does this command do? Cat food 1 > kitty
What is {} in find command?
What is the general format of unix command syntax?
What is the size of time_t?
What is awk used for?
What is the difference between grep and grep?
Does cp command overwrite files?
What does the “echo” command do?
How can we use grep command in unix?