Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do I open a port?

1094


Write a command to kill the last background job?

1107


What is command statement?

1183


What do know about tee command?

1168


What command is used to check the current users?

1136


Explain the steps that a shell follows while processing a command.

1238


What does pipe () return?

1080


How do I find previous commands in unix?

1195


What are the commands in UNIX to list the files in a Directory?

1192


What is grep r?

1107


How do I search for a file in unix command?

1023


How do I run a whois command?

1156


What is the use of the command 'ls -x chapter[1-5]' ?

1216


How do you grep recursively?

1111


What is the use of find command in unix?

1159