Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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!