Questions tagged [base64]
Questions about encoding/decoding file or stdin by using base64
56 questions
0 votes
2 answers
812 views
How to base64 encode/decode accents characters [closed]
I am trying to base64 encode a string which contains accent characters. echo FILE_DATE.Ç | iconv -t utf-8 | base64 But it is giving error iconv: (stdin):1:10: cannot convert locale outputs: LANG= ...
0 votes
1 answer
1k views
How to make base64 print the encoded output after a newline without newline being encoded?
I like to encode with base64 from stdin by invoking the command pasting the input and pressing Ctrl + D twice in order to avoid a trailing newline if I don't want one to be part of the input. It ...
8 votes
1 answer
1k views
Why is 0x00 being deleted when assigning a base64 decoded string to a variable
I'm using a Mac. In Bash, I'm trying to decode a base64 string and then try to print the Hex value. I'm using base64 -d command and then assigning it to a variable. myText='YYN29+...
0 votes
2 answers
559 views
Replace a base64 value from file
I have one file which is gets details from ldapsearch command and create file as below # lschuler, people, pl.s2-eu.XXXXXXXXX.local dn: uid=lschuler,ou=people,dc=pl,dc=s2-eu,dc=XXXXXXXXX,dc=local ...
3 votes
1 answer
4k views
How to decode base64 for both Linux and macOS?
On Linux I can do: echo ${ANDROID_KEYSTORE} | base64 -di > android/keystores/staging.keystore But on macOS, the same commands give: base64: option requires an argument -- i Usage: base64 [-hvDd] [...
0 votes
0 answers
566 views
base64 decode as save as multiple files
I have a file(har file saved from web developer" that contains the base64 encoded value of multiple video*.ts files. I am interested to decode the base64 part and save as multiple ts files if the ...
-1 votes
1 answer
14k views
base64: invalid input error when trying to decode contents of yaml file
What specific syntax must be changed in the bash below to successfully decode the base64 encoded value which is throwing the error below? THE ERROR: The following 3 simple commands are typed into the ...
3 votes
1 answer
2k views
running base64 encoded bash script gives me error
I have a bash script; the script is to generate a random number and have the user guess it. printf 'Guess the number (1-10) : ' read -r n randint=$(( ( RANDOM % 10 ) + 1 )) if [ $n = $randint ]; then ...