Skip to main content
edited body
Source Link
FloHimself
  • 11.8k
  • 3
  • 24
  • 24

Your question suggests that you want to base64 encode the content of a variable:

$ TEXT=test
$ ENCODED=$(echo ${TEXT}"$TEXT" | base64)
$ echo ${ENCODED}"$ENCODED"
dGVzdAo=

Your question suggests that you want to base64 encode the content of a variable:

$ TEXT=test
$ ENCODED=$(echo ${TEXT} | base64)
$ echo ${ENCODED}
dGVzdAo=

Your question suggests that you want to base64 encode the content of a variable:

$ TEXT=test
$ ENCODED=$(echo "$TEXT" | base64)
$ echo "$ENCODED"
dGVzdAo=
Source Link
FloHimself
  • 11.8k
  • 3
  • 24
  • 24

Your question suggests that you want to base64 encode the content of a variable:

$ TEXT=test
$ ENCODED=$(echo ${TEXT} | base64)
$ echo ${ENCODED}
dGVzdAo=