Re: Utility to get IP address of the machine

2006-01-04 Thread Peter J. Acklam
Herb Martin wrote: > While it is almost always more useful to use "Ipconfig > /all" when working interactively, when one just wants the > IP addresses just using plain "ipconfig" gets them without > so much noise to parse through. Or perl -MSocket -MSys::Hostname -wle \ 'print inet_ntoa

SV: SV: Bug in printf ?

2005-06-30 Thread Peter J. Acklam
Dave Korn wrote: > Have you considered that your sunblade might be operating > in a different rounding mode, by default? I didn't know there were different rounding modes. I thought everyone used so-called "unbiased rounding", so I'm sorry for adding confusion. > I would imagine that printf may

SV: SV: Bug in printf ?

2005-06-30 Thread Peter J. Acklam
Dave Korn [EMAIL PROTECTED] wrote: > [EMAIL PROTECTED] wrote: > > > How come "0.125" gets printed as "0.12", and not "1.3"? > > Absolutely, there's a rounding error of some sort. For what it's worth: My Sunblade 100 running Solaris 9 has Solaris' /bin/printf and GNU's printf as /usr/local/bin/pr

Re: Bug in printf ?

2005-06-30 Thread Peter J. Acklam
[EMAIL PROTECTED] wrote: > ::How come "0.125" gets printed as "0.12", and not "1.3"? > ^^^ "0.13", off cource ;-) Dealing with integers illustrates the matter more clearly. When the decimal value is exactly 0.5, then printf should round to the n

SV: Bug in printf ?

2005-06-30 Thread Peter J. Acklam
[EMAIL PROTECTED] wrote: > I'm seeing small bug in printf implementation. What bug? I didn't see anything unexpected. Peter -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.htm

SV: LS and spaces in path names (the xth)

2005-06-28 Thread Peter J. Acklam
I don't see the problem. > ls -hog "CD *" > ls: CD *: No such file or directory Of course. There is no file whose name is the four character string "CD *", so ls doesn't find anything. > ls -hog "CD [12]*" > ls: CD [12]*: No such file or directory Ditto. There is no file whose name is the six

Re: `touch' created wrong file without giving error

2004-06-04 Thread Peter J. Acklam
Corinna Vinschen <[EMAIL PROTECTED]> wrote: > On Jun 4 08:41, Peter J. Acklam wrote: > > > I tried creating a file named " foo ", i.e., with two leading > > and two trailing blanks using "touch". It turned out that > > "touch" created

`touch' created wrong file without giving error

2004-06-03 Thread Peter J. Acklam
^^ "touch" returned exit status 0, but failed to create the file. "ls" also shows that the file only has the leading blanks: $ ls -b *foo* \ \ foo Should "touch" return an error when it fails? Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.onlin

RE: Recommended *nix newsgroups??

2004-01-30 Thread Peter J. Acklam
zzapper <[EMAIL PROTECTED]> wrote: > We are not supposed to discuss actual usage of *nix tools > in this newsgroup. But I would like some recommendations of > active *nix groups for say queries on shell, find etc. Check out the comp.unix.* groups, notably comp.unix.shell. Pet

RE: csh color codes

2004-01-29 Thread Peter J. Acklam
> csh does nothing to interpret the sequences; it simply echoes them. I think the problem was how to *enter* the escape sequences in csh. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjacklam -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Prob

RE: csh color codes

2004-01-29 Thread Peter J. Acklam
[41m red \033[m' printf '\033[42m green \033[m' printf '\033[43m yellow \033[m' printf '\033[44m blue \033[m' printf '\033[45m magenta \033[m' printf '\033[46m cyan \033[m' printf '\033[47m white \033[m'

RE: perl cygwin weird thing ..

2004-01-29 Thread Peter J. Acklam
pokley <[EMAIL PROTECTED]> wrote: > > perl will core dump when parsing file contain > printf "%s",'a' x 0x; > > does anybody got the same problem ? Looks just fine... $ perl -c < printf "%s",'a' x 0x; >

RE: cygwin/regex is non-POSIX

2004-01-20 Thread Peter J. Acklam
nsion first appeared in Perl some 10+ years ago. It is used after the quantifiers ?, *, +, and {m,n} to get "non-greedy" or "minimal" matching. The extension became popular and now implemented in several regex engines. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://h

RE: deleting a file ending with a dot

2004-01-16 Thread Peter J. Acklam
Baurjan Ismagulov <[EMAIL PROTECTED]> wrote: > > Peter J. Acklam wrote: > > > > ls -1ib DIR # find inode number NUM > > ls: cachedmetrics.: No such file or directory Huh. ls seems to notice that the directory contains a file named something like &

RE: deleting a file ending with a dot

2004-01-16 Thread Peter J. Acklam
tar file containing files with trailing dots. (The tar file was created on Solaris.): $ tar xvf bad.tar foo/ foo/bar0 foo/bar1. foo/bar2.. foo/bar3... foo/bar4 foo/bar5. $ ls -1 foo bar0 bar1 bar2 bar3 bar4 bar5 The dots are gone. Peter --

Re: Perl CPAN module help

2003-11-19 Thread Peter J. Acklam
, MD5, Net::Telnet, > Term::ReadLine::Perl.) True, but I'm not sure whether someone who has problems installing CPAN modules is yet capable of building a new version of Perl. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjacklam -- Unsubscribe info: http://cygw

Re: Plus sign '+' in file permissions

2003-11-18 Thread Peter J. Acklam
olaris too. See the manual pages for "getfacl" and "setfacl". Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjacklam -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/

Re: Perl CPAN module help

2003-11-18 Thread Peter J. Acklam
r better yet Bundle::LWP), don't install the HEAD alias, since you'll end up with a name conflict with the standard head utility. *Whew* That should be all, I think. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjacklam -- Unsubscribe info:

Re: Perl CPAN module help

2003-11-17 Thread Peter J. Acklam
/usr/lib/perl5/site_perl . You may try to remove modules under /usr, but be careful so you don't remove things you need. If you really want to remove them, I'd rather do that by uninstalling Perl, removing everything under /usr/lib/perl5 and start over with a clean Perl insta

Re: Perl CPAN module help

2003-11-16 Thread Peter J. Acklam
make test make install this is done with the CPAN shell by setting cpan> o conf makepl_arg PREFIX=/usr/local cpan> o conf commit > Any idea what is going wrong, or is the question better posed to > a perl forum? The "head" vs "HEAD" is a Cygwi

RE: Perl CPAN module help

2003-11-14 Thread Peter J. Acklam
d->uptodate; > printf "Module %s is installed as %s, could be updated to %s from C >PAN\n", $mod->id, $mod->inst_version, $mod->cpan_version; >} > >which gives you a list of all installed modules, including the >distribution ones. No, no! It only lists

RE: Perl CPAN module help

2003-11-14 Thread Peter J. Acklam
> } > else { > # here when not up to date > printf "%s %s, NEW VERSION=%s\n", > $mod->id, $mod->inst_version, $mod->cpan_version; > } That will miss all modules that don't exist on CPAN. Peter

RE: tail

2003-11-13 Thread Peter J. Acklam
see what it is, so try "which tail". Is it /usr/bin/tail? Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjacklam -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation:

RE: "Cannot read: No space left on device" accessing DDS3 drive on W2K

2003-11-13 Thread Peter J. Acklam
pe drive support the density you used when the tape was written? I remember seeing strange error messages when I had written a tape with density 35 and tried to read it with an older tape drive which only supported densities up to 20. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online

RE: Perl CPAN module help

2003-11-13 Thread Peter J. Acklam
that if you do a perldoc perllocal you only get the first >three modules listed, whereas if you do a more on the perllocal >file, you see a lot more listed. What's up with that, can anyonw >explain? I have never used "perldoc perllocal" to see what modules I have i

RE: how to do "hexdump" to analyze special white-space characters?

2003-11-11 Thread Peter J. Acklam
other options too. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjacklam -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/

RE: Is there a 'ping' in Cygwin?

2003-10-17 Thread Peter J. Acklam
Corinna Vinschen <[EMAIL PROTECTED]> wrote: > > Peter J. Acklam wrote: > > > > "Hughes, Bill" <[EMAIL PROTECTED]> wrote: > > > > > Apologies if this is as dumb as it seems to me, > > > but is 'ping' available in Cygwin from

RE: Is there a 'ping' in Cygwin?

2003-10-17 Thread Peter J. Acklam
"Hughes, Bill" <[EMAIL PROTECTED]> wrote: > Apologies if this is as dumb as it seems to me, > but is 'ping' available in Cygwin from the prompt? If you have installed "inetutils", yes. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home

RE: Perl, the GMP library, and the Math::BigInt::GMP module

2003-10-09 Thread Peter J. Acklam
0) DIED. FAILED tests 1-117 Failed 117/117 tests, 0.00% okay t/bigintpm....ok 1/2365# Test 2 got: (bigintpm.inc at line 193) # Expected: '1234-345' # Test 3 got: (bigintpm.inc at line 193 fail #2) t/bigintpmNOK 3# Expected: '3' [...] Peter

Perl, the GMP library, and the Math::BigInt::GMP module

2003-10-07 Thread Peter J. Acklam
I have installed the latest versions of Perl and the GMP library, and want to install the Math::BigInt::GMP Perl module which makes use of this GMP library, but I can't make them play together. There is a complaint "No library found for -lgmp", but I know the library is installed. I can also see

RE: cp /dev/zero filename creates large files

2003-09-25 Thread Peter J. Acklam
l always return a buffer full of zeros (that is NULs, not the digit or letter zero). /dev/zero has infinite length, so copying from it with "cp" to a regular file will always cause you do run out of disk space. Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjack

/usr/bin/tar: Archive value 88578 is out of uid_t range 0..65535

2003-02-01 Thread Peter J. Acklam
I use the cpan shell to install Perl modules, but I often get the error messages like /usr/bin/tar: Archive value 88578 is out of uid_t range 0..65535 and tar ends with a non-zero exit status so the module won't install. How can I get around this? Are there any plans of supporting higher uid

Re: perl -i is very dangerous !

2002-05-06 Thread Peter J. Acklam
"Gerrit P. Haase" <[EMAIL PROTECTED]> wrote: > Marc schrieb: > > > mc@MILLENIUM:~/test/perldestroy# cat test.txt > > this is > > a test > > for cygwin > > mc@MILLENIUM:~/test/perldestroy# perl -i -ne 's/this/works/' test.txt > > Can't do inplace edit on test.txt: Permission denied. > > mc@MILLEN

Re: /usr/bin/env - Incorrect parsing of #! line?

2002-02-21 Thread Peter J. Acklam
Christopher Faylor <[EMAIL PROTECTED]> wrote: > Peter J. Acklam wrote: > > Since the behaviour is different when the line is in the > > shebang line, it has to be documented somewhere. > > AFAIK, it isn't documented anywhere except in the code. I don'

Re: /usr/bin/env - Incorrect parsing of #! line?

2002-02-21 Thread Peter J. Acklam
"Larry Hall (RFK Partners, Inc)" <[EMAIL PROTECTED]> wrote: > Well if env documentation states a particular behavior and that > behavior is not what you see, then there is a bug in env or it's > documentation. What made me believe that "#!/usr/bin/env perl -w" should work was the following part

Re: /usr/bin/env - Incorrect parsing of #! line?

2002-02-20 Thread Peter J. Acklam
Charles Wilson <[EMAIL PROTECTED]> wrote: > Peter J. Acklam wrote: > > > Christopher Faylor <[EMAIL PROTECTED]> wrote: > > > > > Peter J. Acklam wrote: > > > > > > > [...] > > > > why does Cygwin look for the file "

Re: /usr/bin/env - Incorrect parsing of #! line?

2002-02-20 Thread Peter J. Acklam
"Chris January" <[EMAIL PROTECTED]> wrote: > Peter J. Acklam wrote: > > > [...] on Cygwin I get > > > > /usr/bin/env: perl -w: No such file or directory > > > > why does Cygwin look for the file "perl -w". No UNIX I have > &g

Re: /usr/bin/env - Incorrect parsing of #! line?

2002-02-20 Thread Peter J. Acklam
Christopher Faylor <[EMAIL PROTECTED]> wrote: > If it works the same way on linux and on cygwin, then there is > nothing to fix. Ok. But where is this documented? I expected "#!/usr/bin/env perl -w" to work because I thought the line would be interpreted as on the command line (shell) and as i

Re: /usr/bin/env - Incorrect parsing of #! line?

2002-02-12 Thread Peter J. Acklam
"David Gluss" <[EMAIL PROTECTED]> wrote: > I don't know if it's constructive to suggest an alternative trick, rather > than trying to fix cygwin, in this forum. However, this might work > for you: >> >>: # -*-Mode: perl;-*- use perl, wherever it is >>eval 'exec perl -wS $0 ${1+"$@"}'

Re: /usr/bin/env - Incorrect parsing of #! line?

2002-02-12 Thread Peter J. Acklam
Christopher Faylor <[EMAIL PROTECTED]> wrote: > Peter J. Acklam wrote: > > > [...] > > why does Cygwin look for the file "perl -w". No UNIX I > > have worked on would parse the shebang line that way. > > Because... we're mean. I'm

/usr/bin/env - Incorrect parsing of #! line?

2002-02-12 Thread Peter J. Acklam
I use different computers where Perl is installed different places, so I can't hardcode the location of perl in the shebang line. Thus, I use env, which works great on all UNIXes I work on, for instance #!/usr/bin/env perl -w print "This is Perl version $]\n"; but on Cygwin I get