0

I very much new to shell script. I was analyzing a script where i found a line as below

ABC="$GENABC +1 +2 +3 +4 +5 +6 +7 -8" ; export ABC

I don't understand what does +1 +2 etc stands for. Kindly explain me.

1
  • 1
    I don't think it does anything. :) If you run a "export |grep ABC" it will give the same input as output Commented Dec 23, 2015 at 12:19

1 Answer 1

2

As rjdkolb indicates the + characters there are just that, literal + characters in the value of the ABC variable.

You could have seen that easily enough yourself by trying it.

As I've done, for example, at http://ideone.com/H6vMeg

$ GENABC="original value"
$ ABC="$GENABC +1 +2 +3 +4 +5 +6 +7 -8" ; export ABC
$ declare -p ABC
declare -x ABC="original value +1 +2 +3 +4 +5 +6 +7 -8"
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.