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 used to type command?
What are the differences among a system call, a library function, and a unix command?
What do chgrp command do?
What does the command '$ls | wc –l > file1' do?
What is the first character of the output in ls l command?
why metadb requires a seperate slice to create Solaris volume manager
What is the functionality of a top command?
What is unix command?
What is the use of finger command?
What is a bash command?
Why is it called a shebang?
Why is it called grep?
Which unix command to make a new directory?
Explain how to use grep command to list find the records of a file containing 10 different strings?
What is awk used for?