2

I have defined the string variable

value=“c:/program files/tm su/usr”

I need to use this variable in another string like

Bashcmd=“Override project={value}”

I tried adding the rf option like this

Bashcmd =rf“Override {value}”

But it’s printing only until c:/program, white spaces are neglected. Is there any way to use entire path in Bashcmd and can’t remove spaces in directory path because many system share same paths.

2

1 Answer 1

2

You can format strings like this:

value="c:/program files/tm su/usr"
Bashcmd=f"Override project=\"{value}\""

or you can simply concatenate the string like this:

Bashcmd="Override project=\""+value+"\""
Sign up to request clarification or add additional context in comments.

1 Comment

My question was little different,made mistake white editing.I need to pass arguments like project which includes the path of the some folder while executing bash command like project={value} as in my recent edits

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.