I'm trying to create a bash script where I need to encode a variable called "var" in base64 28 times. After the loop, I want to store the character count of the 28th encoded string into a variable called "salt." However, I've been struggling to get this to work, and nothing seems to produce the right result. Here's the context of my script and the decryption function I'm working with...
3 Answers
It seems like you're trying to obfuscate something. Just to clarify, could you tell us what the end goal of this script is? I'm a bit new to bash and this looks like it could be tricky!
To encode your variable in base64 28 times, you can use this loop:
```bash
for i in {1..28}; do
var="$(echo "${var}" | base64)"
done
salt=${#var}
```
Just keep in mind that newline characters from `echo` might throw off your results!
You might want to use ShellCheck to help catch errors—looks like you're missing a lot of quotes in your script! They can help clarify the commands and prevent issues during execution.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically