1

I am writing a bash script. I want to be able to change the numbers assigned to -tot_src, etc, in the below line that is included in the bash script. How do I do this?

./eperftool -tot_src=250 -tot_rep=200 -loss=3:200

First step would be to declare e.g. the following:

TOT_SRC = 273

I tried the following, but it is not working:

 ./eperftool -tot_src=$TOT_SRC -tot_rep=200 -loss=3:200
1
  • 4
    TOT_SRC = 273 should be TOT_SRC=273 without white space Commented May 8, 2012 at 16:54

1 Answer 1

1

In contrast to most programming languages, bash is sensitive to blanks in assignments.

right:

TOT_SRC=273

wrong:

TOT_SRC = 273
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.