I've read some other piping bash string manipulation questions but they seem to be specialized applications.Essentially, is there a way to do the below simpler?instead of$ string='hello world'; string2=${string// /_}; echo ${string2^^}HELLO_WORLDsomething like $ echo 'hello world' | ${-// /_} | ${ -^^}HELLO_WORLDEditI'm interested in staying within bash manipulations if possible to maintain speed (as opposed to sed/awk which have a tendency to greatly slow down my scripts)Edit2: @jimmij I like the second example and led me to making a function. bash_m() { { read x; echo ${x// /_}; } | { read x; echo ${x^^}; }; }echo hello world | bash_mHELLO_WORLD
Piping bash string manipulation
bash;string;variable substitution