From: Josh Cheek Date: 2012-01-07T21:45:05+09:00 Subject: Re: one liner to insert line in a file --0016e6d64176bc37fd04b5ef88a2 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 7, 2012 at 5:32 AM, Gavin Sinclair wrote: > On Sat, Jan 7, 2012 at 10:28 PM, Josh Cheek wrote: > > > > Downside is it doesn't work on multiple files since Ruby's $. doesn't > reset > > for each file (not sure why not). > > If you pass multiple files on the command line, they're combined > through ARGF into one long stream. > > Gavin > > Yeah, I guess it's basically awk's NR, but it seems like there should be something equivalent to awk's FNR --0016e6d64176bc37fd04b5ef88a2--