I have a variable var="TAG: *** Reason:Circumvention *** SSC" I have to put this variable between double quotes otherwise it changes the *** into the files on my homedirectory
$ var="TAG: *** Reason:Circumvention *** SSC"
$ echo $var
TAG: sqlnet.log test.sh tst.sh Reason:Circumvention sqlnet.log test.sh tst.sh SSC
$ echo "$var"
TAG: *** Reason:Circumvention *** SSC
Now I want to change all * into another character (e.g. <) and put it into a new variable (so I don't have to put it into double quotes anymore) but it seems it replaces the whole variable by <. How can I avoid this ?
$ echo "$var"
TAG: *** Reason:Circumvention *** SSC
$ newvar="${var//*/<}"
$ echo $newvar
<