-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Whether or not single quotes work depends on the command, as it's the command that has
to parse the argument list.
Those commands that don't take wildcards you can run inside of a for loop...for
example:
for %f in (*.htm) do perl -e '-s/f:/g:/gi' -p -i.bak %f
cmd.exe (as opposed to command.com) has a number of options for the for command...for
/? will show them.
- -----Original Message-----
From: Philip Newton [mailto:[EMAIL PROTECTED]]
Sent: May 03, 2000 9:52
To: Perl-Win32-Users Mailing List
Subject: Re: newbie trying single liner on win95.
Bapat, Aniruddha (IE03) wrote:
> when I tried
>
> c:\>perl -e 's/f:/g:/gi' -p -i.bak *.htm
> a message is shown as 'can't open *.htm: No such file or directory'
> when I am specifying a specific file in the same command nothing is
> happening and no error msg is shown.
1) As far as I know, you need to use "double quotes" rather than 'single
quotes' in Win95/98/NT/2000 -- single quotes work fine under Unix shells but
not under cmd.exe/command.com.
2) Unix shells expand wildcards such as *.htm; DOS does not. One way to get
expansion is to use Jenda's G module, available e.g. from
http://jenda.mccann.cz/#G or with PPM (location
http://Jenda.McCann.cz/perl). Add "-MG" without the quotes to the
environment variable PERL5OPT and you can use *.htm.
3) (minor nitpick) it's usually called a "one-liner", rather than "single
liner".
Cheers,
Philip
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>
iQA/AwUBORA+mz1j58pgs53KEQLOdgCfYDEvaQcsUyFNi+DXpTsf7lAubYIAnj+t
ZjQusFT4a27lhRYDiLzRe69d
=tYNj
-----END PGP SIGNATURE-----
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]