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
Is ‘du’ a command? If so, what is its use?
What does pipe () return?
why metadb requires a seperate slice to create Solaris volume manager
Who command in unix operating system?
What is grep in bash?
What are some command words?
What difference between cmp and diff commands?
What is the use of cut command in unix?
How do I clear my terminal history?
What are awk commands?
What is updatedb?
What does the md command do?
Name the various commands that are used for the user information in unix.
What are the unix commands?
How do I run a whois command?