command line commands from inside perl ? 
Author Message
 command line commands from inside perl ?

Hi to everybody !
I have the follwing question:
How can I call a normal command line command ?
I need to get informations from whois
e.g.:
whois -h whois.internic.net identifier

How can I manage this with perl ?
How do I get the anser into a variable ?

any suggestions welcome !

Jimmy Koerting



Fri, 02 Apr 1999 03:00:00 GMT  
 command line commands from inside perl ?

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc,

:Hi to everybody !
:I have the follwing question:
:How can I call a normal command line command ?
:I need to get informations from whois
:e.g.:
:whois -h whois.internic.net identifier
:
:How can I manage this with perl ?
:How do I get the anser into a variable ?
:
:any suggestions welcome !

You have asked an unbelievably trivial question.

I suggest that you look at other people's code for ideas.
I suggest that you read the man pages.
I suggest that you check out the FAQ.
I suggest that you read a book.  Start with the Llama.

In short, I suggest that you do a bit of work on your own
instead of looking for freebies.  

You're welcome.

--tom
--

lint(1) is the compiler's only means of dampening the programmer's ego.



Fri, 02 Apr 1999 03:00:00 GMT  
 command line commands from inside perl ?

Quote:

>  [courtesy cc of this posting sent to cited author via email]

> In comp.lang.perl.misc,

> :How can I call a normal command line command ?
> [...]

> You have asked an unbelievably trivial question. [...]

It's good to rant at newbies who aren't resourceful, but why post it?

The answer is, it doesn't benefit the group, and there's no reason
to post it.

This fellow probably already got a copy of the auto-FAQ by email, too.

(I'm posting this minor rant in the hope of seeing less of these
in the future, but of course I'm dreaming.)

        -joseph

--

Proprietor, 5 Sigma Productions          P.O. Box 6250 Chandler AZ 85246
Perl instruction (http://www.5sigma.com/perl/), C++/C/Perl software,



Sat, 03 Apr 1999 03:00:00 GMT  
 command line commands from inside perl ?


: >
: >  [courtesy cc of this posting sent to cited author via email]
: >
: > In comp.lang.perl.misc,

: > :How can I call a normal command line command ?
: > [...]
: >
: > You have asked an unbelievably trivial question. [...]

Tom's post hasn't arrived here yet, so I can't read the whole thing.
I too, occasionly slip into rant mode, so here is why I post 'em
instead of emailing. Since I haven't read it, I'm assuming it is
what *I* would call a 'rant' rather than a 'flame'...

: It's good to rant at newbies who aren't resourceful, but why post it?
                                                           ^^^^^^^^^^^

So the other newbies (I sure hope they actually read some of the
articles posted here, rather than only _their_ immediate
question/thread) will attempt some resourcefulness before posting?

That's why I do it.

NOTE:
If I feel myself slipping yet further from a 'rant' into a
'flame', then I take a break for several minutes. If it is _still_
a flame, then I use email instead.

: The answer is, it doesn't benefit the group, and there's no reason
                                                           ^^^^^^^^^
: to post it.

Less of these (the original one) posts would benefit the group IMHO.

Less of these (the original one) would also result in less of
these (Tom's  ;-)

I feel that Tom's (and my) approach may result in less of
these (both).

So, maybe a 'reason' that you don't agree with, but not 'no reason'...

: (I'm posting this minor rant in the hope of seeing less of these
: in the future, but of course I'm dreaming.)

Please excuse my counter-rant ;-)

--
  Tad McClellan,      Logistics Specialist (IETMs and SGML guy)

  All I want, is a little more than I'll ever get.



Sun, 04 Apr 1999 03:00:00 GMT  
 command line commands from inside perl ?

Quote:

>Hi to everybody !
>I have the follwing question:
>How can I call a normal command line command ?
>I need to get informations from whois
>e.g.:
>whois -h whois.internic.net identifier
>How can I manage this with perl ?
>How do I get the anser into a variable ?

coxwest1:$ perl -e '$stuff = `whois perl.com`; print "$stuff\n";'
Perl Consulting (PERL-DOM)
   2227 Canyon Blvd, #262
   Boulder, CO 80302

   Domain Name: PERL.COM

   Administrative Contact, Technical Contact, Zone Contact:

      (303) 444-3212

   Record last updated on 07-Sep-94.
   Record created on 16-Aug-94.

   Domain servers in listed order:

   XOR.COM                      192.225.33.1
   NUGGET.RMNUG.ORG             138.67.4.15

The InterNIC Registration Services Host contains ONLY Internet
Information
(Networks, ASN's, Domains, and POC's).
Please use the whois server at nic.ddn.mil for MILNET Information.

Get Learning Perl or Programming Perl. Both cover this.

Jason C. Bodnar

Internet Programmer
Cox Interactive Media



Sun, 04 Apr 1999 03:00:00 GMT  
 command line commands from inside perl ?

Quote:


> : The answer is, it doesn't benefit the group, and there's no reason
>                                                            ^^^^^^^^^
> : to post it.

> Less of these (the original one) posts would benefit the group IMHO.

> Less of these (the original one) would also result in less of
> these (Tom's  ;-)

> I feel that Tom's (and my) approach may result in less of
> these (both).

Well, the way I look at it is that if everybody *tries* not to respond
to offensively stupid questions, there will enough "ya dumbshit"
posts anyway.

I try to ignore 'em all, and that means that I go off on someone
once or twice a month.  Probably about the right frequency.  Obviously
if you went off on every guy who needs to learn to help himself
you'd be making 50 posts like that a day.

So, if DO you think it's the right thing to do, why aren't you
jumping on every single one of the "how do I make a CGI?" posts?

The answer is (I believe) that you know it's not really the right
thing to do ... but maybe just a little bit won't hurt.  That's pretty
much the way I feel when I go on a rant, anyway.

Don't forget that there is also a cachet in telling someone off
in the most elegant, articulate, offhand way possible.  At least
we imagine that there is, and that's yet another reason these things
wind up posted.  I admit it; I do it.  See an opening, need something
to brighten up my day -- hard not to go for it!  Maybe if it's a clever
posting the entertainment value will outweigh the social harm of
bad karma and wasted bandwidth.  Or maybe not.

Just my $.02.

And why am I posting THIS?

Well, who knows.  It's Saturday.

        -joseph

--
76% of all CGI questions posted in comp.lang.perl.misc are answered by:
"CGI.pm.  LWP.  http://www.perl.com/CPAN/modules/01modules.index.html."
....

Proprietor, 5 Sigma Productions          P.O. Box 6250 Chandler AZ 85246
Perl instruction (http://www.5sigma.com/perl/), C++/C/Perl software,



Wed, 07 Apr 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. (???) Accessing the command line from inside a script (Yes, I'm a newbie)

2. capturing command line error or output from `<command>`

3. Running Command Line Commands

4. executing commands, command-line vs. browser

5. Output of a command line command

6. RE : DIFFICULT: Can't execute system command from FVWM, but can from the command line

7. How to run a command at the command line

8. Perl to convert DOS commands inside Unix !!!!!!

9. -F works on command line but not on #!perl -paF line

10. Perl command line search and line replace

11. Running a UNIX command from inside a perl script

12. how to do dos command inside perl (in nt)

 

 
Powered by phpBB® Forum Software