From: Eric Christopherson Date: 2013-01-12T04:31:47+09:00 Subject: Re: Ruby command Line options On Fri, Jan 11, 2013 at 12:07 PM, Arup Rakshit wrote: > Bartosz DziewoƄski wrote in post #1091898: >> On Fri, 11 Jan 2013 13:03:28 +0100, Arup Rakshit >> wrote: > >>> -F pat >>> >>> -i [ ext] >> > > Can any one help me to understand how the above two options work in > Ruby? They are all used primarily for one-liners (i.e. invocations where a script is specified as a string on the command line after -e); the switches in question closely mirror those present in perl, awk, and sed. -F is for use only with -a; -a in turn is for use only with -n or -p. -n and -p take the script that's the argument to -e and wrap it in a loop. The loop is equivalent to `while gets;