Windows PowerShell vs. bash examples - Ubuntu

This is a discussion on Windows PowerShell vs. bash examples - Ubuntu ; jellybean stonerfish wrote: > > On Sun, 02 Nov 2008 22:37:57 -0600, Ignoramus22113 wrote: > > > And here's how you do it with bash: > > > > awk '{print "Use WMI to get OS and SP versions from ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 27 of 27

Thread: Windows PowerShell vs. bash examples

  1. Re: Windows PowerShell vs. bash examples

    jellybean stonerfish wrote:
    >
    > On Sun, 02 Nov 2008 22:37:57 -0600, Ignoramus22113 wrote:
    >
    > > And here's how you do it with bash:
    > >
    > > awk '{print "Use WMI to get OS and SP versions from " $1}' < hosts.txt

    >
    > You cheated. You are supposed to do it in bash, not use bash to call
    > awk.
    >
    > sf


    perl -e 'while(<>) { print "Use WMI to get OS and SP versions from $_"
    }' < hosts.txt

    --
    Paul Hovnanian mailto:Paul@Hovnanian.com
    ------------------------------------------------------------------
    Child prodigy procrastinator.

  2. Re: Windows PowerShell vs. bash examples

    In news:4OSdnb4d-ce4HZPUnZ2dnUVZ_u6dnZ2d@giganews.com,
    Ignoramus22113 typed:

    > I am bowed to the genius of PowerShell creators.


    While you're down there ...



  3. Re: Windows PowerShell vs. bash examples

    On 2008-11-04, Paul Hovnanian P.E. wrote:
    > jellybean stonerfish wrote:
    >>
    >> On Sun, 02 Nov 2008 22:37:57 -0600, Ignoramus22113 wrote:
    >>
    >> > And here's how you do it with bash:
    >> >
    >> > awk '{print "Use WMI to get OS and SP versions from " $1}' < hosts.txt

    >>
    >> You cheated. You are supposed to do it in bash, not use bash to call
    >> awk.
    >>
    >> sf

    >
    > perl -e 'while(<>) { print "Use WMI to get OS and SP versions from $_"
    > }' < hosts.txt
    >


    You can do better than that:

    perl -np -e 's/^/Use WMI to get OS and SP versions from /' < hosts.txt

    sed 's/^/Use WMI to get OS and SP versions from /' < hosts.txt

    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  4. Re: Windows PowerShell vs. bash examples


    "Ignoramus7766" wrote in message
    news:zq6dnV0y-KEPXpLUnZ2dnUVZ_s3inZ2d@giganews.com...
    > On 2008-11-04, Paul Hovnanian P.E. wrote:
    >> jellybean stonerfish wrote:
    >>>
    >>> On Sun, 02 Nov 2008 22:37:57 -0600, Ignoramus22113 wrote:
    >>>
    >>> > And here's how you do it with bash:
    >>> >
    >>> > awk '{print "Use WMI to get OS and SP versions from " $1}' < hosts.txt
    >>>
    >>> You cheated. You are supposed to do it in bash, not use bash to call
    >>> awk.
    >>>
    >>> sf

    >>
    >> perl -e 'while(<>) { print "Use WMI to get OS and SP versions from $_"
    >> }' < hosts.txt
    >>

    >
    > You can do better than that:
    >
    > perl -np -e 's/^/Use WMI to get OS and SP versions from /' < hosts.txt
    >
    > sed 's/^/Use WMI to get OS and SP versions from /' < hosts.txt


    That sed line, real fast and super simple.



  5. Re: Windows PowerShell vs. bash examples

    On Mon, 03 Nov 2008 21:37:54 -0600, Ignoramus7766 wrote:

    > On 2008-11-04, Paul Hovnanian P.E. wrote:
    >> jellybean stonerfish wrote:
    >>>
    >>> On Sun, 02 Nov 2008 22:37:57 -0600, Ignoramus22113 wrote:
    >>>
    >>> > And here's how you do it with bash:
    >>> >
    >>> > awk '{print "Use WMI to get OS and SP versions from " $1}' < hosts.txt
    >>>
    >>> You cheated. You are supposed to do it in bash, not use bash to call
    >>> awk.
    >>>
    >>> sf

    >>
    >> perl -e 'while(<>) { print "Use WMI to get OS and SP versions from $_"
    >> }' < hosts.txt
    >>

    >
    > You can do better than that:
    >
    > perl -np -e 's/^/Use WMI to get OS and SP versions from /' < hosts.txt
    >
    > sed 's/^/Use WMI to get OS and SP versions from /' < hosts.txt


    So, Ignoramus. I notice you're quite silent on my rebuttal of your post.

    Why is that?

  6. Re: Windows PowerShell vs. bash examples

    In comp.os.linux.misc Ignoramus7766 wrote:
    > The whole point of bash is to NOT be a bloated pig like powershell,


    Absolutely.
    Chris

  7. Re: Windows PowerShell vs. bash examples

    >> They are intended for Visual Basic people...
    >
    > Microsoft "programmers" seem to think that Visual Basic is a *programming*
    > *language*


    Well... define language!

    --
    @~@ Might, Courage, Vision, SINCERITY.
    / v \ Simplicity is Beauty! May the Force and Farce be with you!
    /( _ )\ (Xubuntu 8.04.1) Linux 2.6.26.7
    ^ ^ 20:34:01 up 6 days 20:53 2 users load average: 1.05 1.12 1.08
    不*伅U! 不詐騙! 不援交! 不打交! 不打劫! 不自殺! 請考慮綜援 (CSSA):
    http://www.swd.gov.hk/tc/index/site_...sub_addressesa

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2