If i give the command echo $- i am getting output of himBH. Can some body explain what does it means
[root@client ~] echo $-
Thanks in Advance
I am new to shell scripting and wished to get few things clarified.
While calling functions within shell script, output comes out as single line irrespective of the no of echos or newlines I tried within function +
the echo -e used to invoke function ( as instructed online) :
echo "value is $value within the function\\n"
echo "\\b\$1 is $1
I've got two sh files, which are "main.sh" and "sub.sh" i want to return a variable's value inside "sub.sh" and use it inside main.sh .There is so many "echo" command so i can't just return the value from sub.sh file. I need only one variable's value.
I need to get the version of python installed and store it in a variable for later use. Whereas it is printing on the console instead of storing to variable. I am able to store output of ls command in a variable.
# cat /root/llll
When I cat this file content to a variable inside a shell script and echo that shell script, it does not show up as separate lines. I need echo output similar to cat.