Operating System - Linux
1751716 Members
5480 Online
108781 Solutions
New Discussion юеВ

Could not set xpg_echo thru' shopt ..

 
Jamni
Frequent Advisor

Could not set xpg_echo thru' shopt ..

Hi all

I am trying to enable the xpg_echo .. but it is throwing an error.

shopt -s xpg_echo
bash: shopt: xpg_echo: unknown shell option name

The option xpg_echo is not already present in the option list.

Any clues how to enable this ??

Regards
Jamni
If a man does his best, what else is there?
3 REPLIES 3
Ramkumar Devanathan
Honored Contributor

Re: Could not set xpg_echo thru' shopt ..

What is the bash version? (use "bash --version" command)

xpg_echo as an option is supported only from bash version 2.04. if your linux box runs earlier versions of bash, then xpg_echo will not be listed in the shopt output too.

if bash --version < 2.04, then use echo -e option, instead of echo, to interpret escape sequences in the way printf would.

>>>>>>>>>>>>>>>>>>>
echo -e "laksjdf\n"
laksjdf

>>>>>>>>>>>>>>>>>>>
echo "lksjadf\n"
lksjadf\n
>>>>>>>>>>>>>>>>>>>
HPE Software Rocks!
Ramkumar Devanathan
Honored Contributor

Re: Could not set xpg_echo thru' shopt ..

What is the bash version? (use "bash --version" command)

xpg_echo as an option is supported only from bash version 2.04. if your linux box runs earlier versions of bash, then xpg_echo will not be listed in the shopt output too.

if bash --version < 2.04, then use echo -e option, instead of echo, to interpret escape sequences in the way printf would.

>>>>>>>>>>>>>>>>>>>
echo -e "laksjdf\n"
laksjdf

>>>>>>>>>>>>>>>>>>>
echo "lksjadf\n"
lksjadf\n
>>>>>>>>>>>>>>>>>>>

try this link - http://www.unixguide.net/unix/bash/B1.shtml

-ramd-
HPE Software Rocks!
Ramkumar Devanathan
Honored Contributor

Re: Could not set xpg_echo thru' shopt ..

What is the bash version? (use "bash --version" command)

xpg_echo as an option is supported only from bash version 2.04. if your linux box runs earlier versions of bash, then xpg_echo will not be listed in the shopt output too.

if bash --version < 2.04, then use echo -e option, instead of echo, to interpret escape sequences in the way printf would.

>>>>>>>>>>>>>>>>>>>
echo -e "laksjdf\n"
laksjdf

>>>>>>>>>>>>>>>>>>>
echo "lksjadf\n"
lksjadf\n
>>>>>>>>>>>>>>>>>>>

try this link - http://www.unixguide.net/unix/bash/B1.shtml

-ramd-
HPE Software Rocks!