Re: perl as command line

2011-05-27 Thread Ireneusz Pluta
W dniu 2011-05-24 06:11, vishesh kumar pisze: Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. generally, you might be interested in http://minimalperl.com/. HTH Irek -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comm

Re: perl as command line

2011-05-26 Thread vishesh kumar
Thanks Jim Now i understood completely. Very good explanation. On Fri, May 27, 2011 at 10:45 AM, Jim Gibson wrote: > At 10:28 AM +0530 5/27/11, vishesh kumar wrote: > >> Hi Jim >> > > You should address all of your questions to the list as a whole. That way > you will get smarter people than

Re: perl as command line

2011-05-26 Thread Jim Gibson
At 10:28 AM +0530 5/27/11, vishesh kumar wrote: Hi Jim You should address all of your questions to the list as a whole. That way you will get smarter people than me helping you. echo $str | perl -pe 's/.*?(\d+\.[\d.]+).*/$1/' Giving desired result, but i wonder what is use of ? in this exp

Re: perl as command line

2011-05-26 Thread vishesh kumar
Hi Jim echo $str | perl -pe 's/.*?(\d+\.[\d.]+).*/$1/' Giving desired result, but i wonder what is use of ? in this expression On Tue, May 24, 2011 at 11:59 AM, Jim Gibson wrote: > At 9:41 AM +0530 5/24/11, vishesh kumar wrote: > >> Hi Members, >> >> I am a linux system admin. I want to use

Re: perl as command line

2011-05-24 Thread vishesh kumar
Thanks Jim Your suggestion working great !!! On Tue, May 24, 2011 at 11:59 AM, Jim Gibson wrote: > echo $str | perl -pe 's/.*?(\d+\.[\d.]+).*/$1/' -- http://linuxmantra.com

Re: perl as command line

2011-05-24 Thread Shlomi Fish
Hi Vishesh, On Tuesday 24 May 2011 07:11:45 vishesh kumar wrote: > Hi Members, > > I am a linux system admin. I want to use perl as a command line like sed > and awk. > For example suppose , i need to extract IP Addr from a string or file using > regrex > i mean > str="hello ip is 192.168.2.1

Re: perl as command line

2011-05-23 Thread Jim Gibson
At 9:41 AM +0530 5/24/11, vishesh kumar wrote: Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. For example suppose , i need to extract IP Addr from a string or file using regrex i mean str="hello ip is 192.168.2.1 and data is xxx" And i want ip a

perl as command line

2011-05-23 Thread vishesh kumar
Hi Members, I am a linux system admin. I want to use perl as a command line like sed and awk. For example suppose , i need to extract IP Addr from a string or file using regrex i mean str="hello ip is 192.168.2.1 and data is xxx" And i want ip addr only using Regex echo $str | perl -pe ?