Is it possible to substitute a thing in env var with SED?
$ a='aoeua'
$ sed 's@a@o@g' <$a
bash: aoeua: No such file or directory
$ env|grep "SHELL"
SHELL=/bin/bash
The output I want is
ooeuo
replacing each a in 'aoeua' with o.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use echo:
In bash you can also do simple substitutions with the
${parameter/pattern/string}syntax. For example:Note that this only replaces the first occurrence of the pattern.