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

What is in grep command?

1181


What is grep in bash?

1076


How do I use nslookup?

1106


Describe the usage and functionality of the command rm –r * in unix?

2116


Name the unix command to find how many days the server has been up.

1168


Are you in or at the office?

1131


How do you grep a case insensitive?

1062


Which command is used to copy files?

1186


What is the nmap command?

1200


What is used to type command?

1068


What are the differences among a system call, a library function, and a unix command?

1242


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

1232


What does the command '$ls | wc –l > file1' do?

1257


Explain ‘library functions’ with respect to unix commands?

1181


What is ‘ps’ command for?

1194