is there anyone has an idea about how to remove hidden characters from a string in shell. this is an exemple :
#echo $a;
[root@localhost ~]#
but when i showw hidden characters :
#echo $a | cat -v
[root@localhost ~]# ls ^H^[[K^H^[[K^H^[[Kpwd^H^[[K^H^[[K^H^[[Kls^H^[[K^H^[[Kpwd^H^[[K^H^[[K^H^[[K
i want to delete hidden characters to have this output
#echo $a | cat -v
[root@localhost ~]#