[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug in polnish epilog script

On Sun, Jul 27, 2003 at 05:28:20PM +0200, Frank Lichtenheld wrote:
>  #!/bin/sh
> -sed -e "s/,,/\„/g; s/''/\”/g;" $1 > temp
> +perl -p -e "s/(^|\s),,/\„/g; s/''/\”/g;" $1 > temp
>  mv temp $1
> I replaced sed with perl because I don't know how to write this
> regex in sed :)

If perl is used, then it would be best to do it this way:

#!/usr/bin/perl -pi

This way we don't assume that working directory is writable (not that it
matters much), and it's cleaner and more flexible.

Marcin Owsiany <porridge@debian.org>             http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216

Reply to: