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 / 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


Please Help Members By Posting Answers For Below Questions

Is ‘du’ a command? If so, what is its use?

1095


What does pipe () return?

1025


why metadb requires a seperate slice to create Solaris volume manager

3084


Who command in unix operating system?

1088


What is grep in bash?

1012


What are some command words?

1086


What difference between cmp and diff commands?

1247


What is the use of cut command in unix?

1298


How do I clear my terminal history?

1093


What are awk commands?

1101


What is updatedb?

992


What does the md command do?

1076


Name the various commands that are used for the user information in unix.

1023


What are the unix commands?

1031


How do I run a whois command?

1100