I have a little command that I use to copy/paste files around that involves pasting the base64-encoded tar archive into stdin, but the base64 utility keeps giving me and error message about my input because I have to type a line break before issuing an EOF to stop the input.
eg:
[root@box ~]echo hello | base64
aGVsbG8K
[root@box ~]base64 -d
aGVsbG8K[enter][ctrl+d]
hello
base64: invalid input
As opposed to the clunkier:
[root@box ~]echo -n 'aGVsbG8K' | base64 -d
hello
Which doesn't really work well in the context of the command I've written.
So is there any way to put in an EOF without that extra line break? I mean this still technically works, but I don't want errors indicated when there isn't an actual error, and I don't want to suppress stderr in case there is an actual error.