5 ms·
It's in the /dev/ folder so it looks like a device file provided by the operating system. But it's not. It's a bash built in pseudo file. So it should work in
by ccouzens 4y ago
It's in the /dev/ folder so it looks like a device file provided by the operating system.
But it's not. It's a bash built in pseudo file. So it should work in bash on other operating systems.
- hericium 4y agoNice thing to learn - thanks. Although the only scenario I can think of at the moment would be the lack of netcat (and telnet). Not a fan of limiting scripts with bashisms. I like them to be runnable under zsh and similar shells despite having /usr/bin/env bash, /bin/bash, /bin/sh shebang.
- ebfe1 4y agoA more sneaky use case is for reverse shell payload when you have code execution :)
- tambourine_man 4y agoYou're right, it does work on macOS. What other cool use cases could it achieve besides checking if a domain is reachable?