delete space string bash code example
Example: how to remove every space in a string in bash
#!/bin/bash
#Make our variable
var="foo bar"
#Print it without the spaces
echo ${var//[[:blank:]]/}
#Output will be foobar
#!/bin/bash
#Make our variable
var="foo bar"
#Print it without the spaces
echo ${var//[[:blank:]]/}
#Output will be foobar