1

Hi My variable is not getting String using shell-script

I try to create string variable But getting Error :- "Missing }."

log_handler_ws_async="<property name='path' value='"${domain.home}"/servers/"${weblogic.Name}"/logs/async.log'/>"

When we use this variable. it's will get same string... we don't want value for this ${weblogic.Name}

echo $log_handler_ws_async

expected output:-

"<property name='path' value='"${domain.home}"/servers/"${weblogic.Name}"/logs/async.log'/>"

1 Answer 1

1

You may use read builtin with heredoc:

read -r log_handler_ws_async <<-'EOF'
<property name='path' value='"${domain.home}"/servers/"${weblogic.Name}"/logs/async.log'/>
EOF

echo "$log_handler_ws_async"

<property name='path' value='"${domain.home}"/servers/"${weblogic.Name}"/logs/async.log'/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.