How do I use cat to base64 encode stdin on the fly with openssl?
15,809
If you type
cat | openssl enc -base64
and then press Ctrl+D then it will encode everything you just typed.
Related videos on Youtube
Author by
nick
Updated on September 18, 2022Comments
-
nick over 1 year
The following command works for encoding
stdin
usingecho
:echo "abc" | openssl enc -base64
This command also works for substituting characters in
stdin
usingcat
:cat | sed 's/a/b/g'
However, the following command, which should encode
stdin
usingcat
does not meet my needs, because it doesn't display the encoded value every time I hit return.cat | openssl enc -base64
How do I encode
stdin
on-the-fly usingcat
?-
David Schwartz about 11 years"Don't work" is not a very good problem description.
-
-
nick about 11 yearsWhile that works, I need a continues result. IE I keep typing and every time I hit return, I get an encoded value out
-
Scott - Слава Україні almost 11 years@nick: If you want to get satisfactory answers, you should edit your question to add details like this.