• Tonton Th
    Tonton Th
    2018-11-16

    #uuoc spotted !

    0
  • Miod Vallat
    Miod Vallat
    2018-11-16

    Ne le provoque pas tonton, sinon il va vouloir se venger.

    0
  • pizzagod@podricing.pw
    pizzagod@podricing.pw
    2018-11-16

    Guilty as charged.

    0
  • Vengeur Masqué
    Vengeur Masqué
    2018-11-21

    Note that these commands are subtly different if "foo" does not exist.

    $ wc < foo
    dash: 1: cannot open foo: No such file
    $ echo $?
    2
    $ cat foo | wc 
    cat: foo: No such file or directory
          0       0       0
    $ echo $?
    0
    $ 
    
    0
  • Tonton Th
    Tonton Th
    2018-11-21

    #fourbitude

    0
  • Vengeur Masqué
    Vengeur Masqué
    2018-11-21

    @utzer
    Yes. The second line is equivalent to:

    wc < /dev/null

    In the first line, wc is not even run.

    0
  • Vengeur Masqué
    Vengeur Masqué
    2018-11-21

    When you have a pipe, like

    aaa | bbb | ccc

    its exit code will be the exit code of the last command (here "ccc"). You have no way to know if "aaa" or "bbb" failed and returned a non-zero code.

    0