From: sto.mar@... Date: 2012-09-06T04:39:40+09:00 Subject: Re: awk equivalent in ruby Am 05.09.2012 21:19, schrieb Ferdous ara: > HI > how to use awk equivalent in ruby > > in bash i can use , awk to get the value 1 how? > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.13.118.99.112.45.48.47.48.46.51.50.55.54.56 > = INTEGER: 1 > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.13.118.99.112.45.48.47.49.46.51.50.55.54.56 > = INTEGER: 1 > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.15.118.99.112.45.48.47.48.47.48.46.51.50.55.54.56 > = INTEGER: 1 > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.15.118.99.112.45.48.47.48.47.49.46.51.50.55.54.56 > = INTEGER: 1 > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.15.118.99.112.45.49.47.48.47.48.46.51.50.55.54.56 > = INTEGER: 1 > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.15.118.99.112.45.49.47.48.47.49.46.51.50.55.54.56 > = INTEGER: 1 > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.15.118.99.112.45.50.47.48.47.48.46.51.50.55.54.56 > = INTEGER: 1 > RFC1155-SMI::enterprises.2636.3.40.1.4.1.2.1.3.1.15.118.99.112.45.50.47.48.47.49.46.51.50.55.54.56 > = INTEGER: 1 which '1' ??? > but in ruby , how can i get the value 1 ?? - puts 1 :) - google for 'ruby regular expressions' (especially capturing might be useful) --