logoalt Hacker News

tkocmathlatoday at 8:49 AM3 repliesview on HN

I love this, from a comment on the article:

  He had in his path a script called `\#` that he used to comment out pipe elements like `mycmd1 | \# mycmd2 | mycmd3`. This was how the script was written:
 
  ```
  #!/bin/sh
  cat
  ```

Replies

rgrautoday at 10:08 AM

A similar trick:

    #!/bin/sh
    $*
that's my `~/bin/noglob` file, so when I call a zsh script from bash that uses `noglob`, it doesn't blow up.
internet_pointstoday at 9:53 AM

Yes! That one's going in my $PATH. Such a useful use of cat!

000ooo000today at 10:21 AM

What does it provide over

mycmd1 #| mycmd2

show 1 reply