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 command will change your prompt to myprompt?
How do I search for a file in unix command?
What does this command do? Cat food 1 > kitty
Explain command to view process running?
Is it inbetween or in between?
What do chmod command do?
Is grep faster than awk?
What does awk stand for?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
Enumerate some of the most commonly used network commands in unix?
Which command can you use to find the currently running process in unix server?
What does sed command do in unix?
Why is shebang used?
How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?
Write a command to kill the last background job?