I'm encoding files with following command:
certutil -encode inputFileName encodedOutputFileName
However, this creates a new file on the system. Is it possible to print encoded data on command line and not write to a new file?
I'm encoding files with following command:
certutil -encode inputFileName encodedOutputFileName
However, this creates a new file on the system. Is it possible to print encoded data on command line and not write to a new file?
Use PowerShell instead
[Convert]::ToBase64String([IO.File]::ReadAllBytes("path\to\file"))
If future PowerShell versions support process substitution like bash (or you have bash on your system) then you can use something like this
certutil -encode inputFile >(/dev/tty)
Currently there may be some workaround to achieve the same purpose. But why do that when both PowerShell and bash already have tools to encode/decode base64 contents?