/dev/null is a special Linux file which discards everything is written to itself and which provides
EOF when read.
I would like to read
/dev/null to obtain and visualize this
EOF. If I try:
$ cat /dev/null | hexdump
it doesn't work. The prompt returns with no output.
EOF doesn't even have an ASCII code, so maybe this is the reason.
EOFstill be considered a character?
Is there a way in bash to detect and print
EOF, when provided in the
$ cat /dev/null | some_tool EOF
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu) on Ubuntu 20.04.3, but I hope that the solution, if any, is not related to these specific versions.
This is not a homework, but just a way to learn more about