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 use grep to search for a file?

1106


What does the md command do?

1200


What are the dos commands?

1317


What is awk good for?

1194


What is ctrl d?

1157


What is the command to find maximum memory taking process on the server?

1267


How do I clear my terminal history?

1231


Explain ‘system calls’ with respect to unix commands?

1158


What is the use of find command in unix?

1216


How does shebang work?

1122


What is “chmod” command?

1244


Why is awk called awk?

1136


What does find command return in unix?

1203


Which command is used to create a directory?

1230


How do I delete files from command prompt?

1282