Skip to content

Instantly share code, notes, and snippets.

@dewomser
Created July 29, 2024 06:59
Show Gist options
  • Save dewomser/0d518c991a159c352f4bc02184adfe70 to your computer and use it in GitHub Desktop.
Save dewomser/0d518c991a159c352f4bc02184adfe70 to your computer and use it in GitHub Desktop.
Bash substitution Space to Plus. An example
#!/bin/bash
unset a[@]
a=("${a[@]}" "Das ist ein Test")
a=("${a[@]}" "Das ist ein Test")
a=("${a[@]}" "Das ist ein Test")
echo "${a[2]//\ /+}"
## Das+ist+ein+Test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment