News for hackers. Stuff that matters.
Re:Use long flags when scripting by taylorfausak on Monday February 04, 2013 @10:37AM (#5164609)
Agreed! It saves a trip to the man page.

Something else I figured out recently is that if you put the pipe at the end of a line, you don't need a backslash:

    echo thing |
    grep thing
Re:Use long flags when scripting by pmattos on Monday February 04, 2013 @10:41AM (#5164625)
I have seen this working, but didn't understand why... thanks!
Re:Use long flags when scripting by ygra on Tuesday February 05, 2013 @05:53AM (#5170059)
I'd probably indent the grep in that case, though, to make things clearer.

My own PowerShell scripts often take the form of

    Get-Foo |
      Where-Object { $_.blah } |
      ForEach-Object { ... }
etc., especially with longer pipelines.
Re:Use long flags when scripting by mooism2 on Tuesday February 05, 2013 @05:25AM (#5170008)
Also works with the && and || operators.