GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Annika Backstrom (annika@xoxo.zone)'s status on Saturday, 31-Aug-2024 06:51:51 JST Annika Backstrom Annika Backstrom

    `cmd > file.txt 2>&1` vs `cmd 2>&1 > file.txt` always tripped me up: the first form is what I usually want (send both to file.txt) but always felt backwards to my brain.

    Prompted by Julia, I read up on https://www.gnu.org/software/bash/manual/html_node/Redirections.html and tried to understand why the first incantation sends both outputs to file.txt

    Also TIL zsh "MULTIOS" which sends stdout to your pipe even if you've redirected to a file.

    In conversation Saturday, 31-Aug-2024 06:51:51 JST from xoxo.zone permalink

    Attachments

    1. No result found on File_thumbnail lookup.
      Redirections (Bash Reference Manual)
      Redirections (Bash Reference Manual)

    2. https://xoxo-media.sfo2.cdn.digitaloceanspaces.com/media_attachments/files/113/053/184/832/302/554/original/f185a9f454d699a1.png
    • Embed this notice
      Annika Backstrom (annika@xoxo.zone)'s status on Sunday, 01-Sep-2024 09:41:29 JST Annika Backstrom Annika Backstrom
      in reply to
      • glyn

      @underlap Well, you'll get it someday 🤷♀️

      In conversation Sunday, 01-Sep-2024 09:41:29 JST permalink
    • Embed this notice
      glyn (underlap@fosstodon.org)'s status on Sunday, 01-Sep-2024 09:41:30 JST glyn glyn
      in reply to

      @annika Huh! I read the linked docs and still don't understand the difference.

      "standard error was made a copy of the standard output" seems wrong/weird as a description of 2>&1 in the second case.

      Does anyone reading this thread claim to understand?

      In conversation Sunday, 01-Sep-2024 09:41:30 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.