I’m going to echo what Laurent_R said. I checked my history from today and I’ve got 257 one liners there. Everything from–

perl -E 'sleep 60 * 115; qx{say "Dishes are done."}' # to ack '(quote|trade)_time' ~/trade.stream | perl -nE '/(\d+)/ and say $1 +' | sort > ~/sorted

I think the disconnect is because WIN is a terribly crippled environment. I personally cannot understand how anyone puts up with it. Even the PowerShell… The funniest part is how often jeffa used to accuse me of being a M$FT shill because I defended Perl use on WIN as being good for Perl. I doubt he hates WIN even as much as I do but it’s none of my business what other people use and the more chairs at the table the better. But I digress; widely, wildly. :P Point is, I’m not even that good with the shell or with sysadmin stuff in general and knowing just a handful of commands and pipe techniques makes me drastically more productive than someone who doesn’t.

TL;DR: I encourage you to explore one-liners and for sure try ack.


In reply to Re^2: beginners trap: one liner by Your Mother
in thread solved: beginners trap: one liner by toohoo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.