This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Problem with perl -i option
- To: "Cygwin-Apps" <cygwin-apps at cygwin dot com>
- Subject: Problem with perl -i option
- From: "Ralf Habacker" <Ralf dot Habacker at saght dot tessag dot com>
- Date: Wed, 15 Aug 2001 10:45:15 +0200
Hi,
perl has an -i[<extension>] option for inplace file changing with an optional
backup extension.
On linux for example you can use this without explicit defining an backup
extension for example "perl -i ... test.txt"
The cygwin port differs in that behavior.
If you use "perl -i ... test.txt" the file "test.txt" will be deleted. One have
to set an explicit file extension "perl -i.bak ... test.txt" for working.
I have found this in the current perl version
Ralf
----------------------------------------------------------------------
$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
Platform:
osname=cygwin, osvers=1.1.6(0.3032), archname=cygwin
uname='cygwin_nt-5.0 fifer 1.1.6(0.3032) 2000-11-21 21:00 i686 unknown '
config_args='-de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
Compiler:
cc='gcc', ccflags
='-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing',
optimize='-O2',
cppflags='-DPERL_USE_SAFE_PUTENV -DHAS_SBRK_PROTO -fno-strict-aliasing'
ccversion='', gccversion='2.95.2-5 19991024 (cygwin experimental)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='ld2', ldflags =' -s -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib
libs=-lgdbm -lcrypt
perllibs=-lcrypt
libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl5_6_1.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Locally applied patches:
v5.6.1-TRIAL1
Built under cygwin
Compiled at Dec 21 2000 21:39:40
@INC:
/usr/lib/perl5/5.6.1/cygwin
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/cygwin
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl
.