I'm having trouble finding a way to properly add multiple variables in a way. (In this case "foo", "bar", and "falcon") and then connected together in a string (ex: x = "foo bar falcon").
The following is the code I put together:
#! / Bin / sh n = 0 # Fu eval assign "data $ {N} = 'foo'" eval "is the first value: \ $ DATA $ N" # First value is: foo N = `expr $ N + 1` The next value is: \ $ Data $ N "# Next Value: Bar N = 'expr $ N + 1` # Name the name of the buzz" Data " The final value is $ {N} = 'baz' "eval" echo: \ $ DATA $ N "# Last value is: ii 0 for baz 0 1 2 do # concatenate foo in bar and baz in a variable Comment- The comment in the for-loop is the area I have trouble now. Any help would be much appreciated. Thanks!
You just have to avoid the $ operator for the first operator pass:
<0> blob = i for 0 1 2 do eval blob = "\ $ blob \ $ data $ {i}" done
Comments
Post a Comment