in reply to Re: Removing repeated lines from file
in thread Removing repeated lines from file

I´ve just created a file called repetitive.txt on my Cygwin system and used perl, v5.6.1 to try your one liner but it gave an error:

Can't do inplace edit on repetitive.txt: Permission denied.

And to my surprise the file was deleted. What can be the reason of that behaviour? Did I miss something?
  • Comment on Re: Re: Removing repeated lines from file

Replies are listed 'Best First'.
Re: Re: Re: Removing repeated lines from file
by jmcnamara (Monsignor) on Jun 24, 2003 at 12:35 UTC

    Perl on Windows can't use -i without an extension. I guess the same applies to Cygwin.

    Try -ni.bak instead.

    --
    John.

      Thanks, it worked without problems and errors :)