cat my_file.txt /dev/zero | head -1
If this command is executed from a remote machine (say from a telnet session), ‘cat’ command prints first line and waits indefinitely (no matter who you login as). This behaviour is true even if the above command is executed on the QNX host PC with a login other than ‘root’.
Am I doing anything wrong?
I have a requirement where in I need to pad with null to make a block out of it. As this was impossible to achieve, I tried compiling GNU source for ‘cat’ and found everything working.
cat_gnu my_file.txt /dev/zero | head -1