You are not logged in.
Pages: 1
Trying to use command:
echo -e "\142"
On my slackware i get this result.
swedala@alfa:~ > echo -e "\142"
b
swedala@alfa:~ >
On my archlinux i get this output:
[swedala@baldur ~]$ echo -e "\142"
\142
[swedala@baldur ~]$
Both workstations are bash shell default, but I can not understand why I not get the same result.
Any idea?
Offline
Arch is using bash's builtin "echo", while your other distro is using the "echo" binary.
[simo@redshift ~]$ echo -e "\142"
\142
[simo@redshift ~]$ man bash
[simo@redshift ~]$ /bin/echo -e "\142"
b
[simo@redshift ~]$
It's possible that your other distro has aliased "bash" to "/bin/bash" in /etc/profile or your bashrc.
The suggestion box only accepts patches.
Offline
Thanks for quick response.
I will check what's aliased on my other dist.
Offline
PCLinuxOS:
[mherring@localhost ~]$ echo -e "\142"
b
[mherring@localhost ~]$ /bin/echo -e "\142"
b
No aliases in place for echo
"It's always something." --Gilda Radner, 1946 - 1989
Offline
$ echo -e "\142"
\142
$ /bin/echo -e "\142"
b
$ which echo
/bin/echo
Weird.
noobus in perpetuus
Offline
Try:
echo -e "\0142"
Maybe it is more portable! Just a guess.
Offline
Pages: 1