4 ms·
Incorrect. The base64 command wraps at 76 columns by default.
by zoltar 6y ago
Incorrect. The base64 command wraps at 76 columns by default.
- oefrha 6y agoWhether there's a wrapping feature depends on the implementation. coreutils base64, yes. Other implementations, maybe not. macOS's /usr/bin/base64 for instance doesn't have the concept of wrapping. FreeBSD base64, judging from the manpage, doesn't do that either. https://www.freebsd.org/cgi/man.cgi?query=base64 https://www.freebsd.org/cgi/man.cgi?query=base64 Edit: Oops, posted some misinformation. The mistaken part, reproduced below: > First, wrapping by default only occurs when writing to a tty. When stdout is redirected to a file, wrapping base64 output usually doesn't make sense, so wrapping doesn't happen. Correction: coreutils base64 wraps regardless of whether stdout is a tty.
- deleted 6y ago[deleted]
- OskarS 6y agoI ran it on macOS, and there I got: $ base64 /dev/urandom | head -c 1000000000 | wc 0 1 1000000000 I haven't tried anywhere else, so it might be different on Linux or GNU or whatever.