1. 7

  2. 6

    If I remember correctly, gawk does a similar thing.

    1. 3

      This is actually used extremely heavily in PenTesting for setting up reverse shells. Check out how we do it in payload generation in Metasploit. You can have just as much fun with other common commands, look at the reverse_* payloads: some versions of ksh, zsh, and awk also have similar fun things.

      1. 1

        it always burns my biscuits that debian and by inheritance, ubuntu, disabled /dev/tcp and /dev/udp in their bash build.

        1. 6

          Personally I’ve always found it a misfeature – if you want networking support directly in the shell, having netcat as a built-in command would make a lot more sense than making up filesystem entries that don’t actually exist.

          1. 3

            I don’t think that’s the case anymore. At least on Ubuntu 18.04, bash is built with network redirections enabled.

          2. 0

            This has nothing to do with Linux, it’s a bash feature.

            1. 3

              The suggestion link is just below the title.