DEV Community

Discussion on: Daily Challenge #46 - ???

Collapse
 
aminnairi profile image
Amin • Edited

Hey there! Nice to see some bash users here.

You can even use bash without sed using this little trick:

#!/usr/bin/env bash

string="??hello??"

echo $string # "??hello??"
echo ${string//\?/} # "hello"

Try it online.

See Manipulating String.