0

I have code like below:

a=$(echo "b")

And I want see output of that at the same time and also get output value to be stored to variable at one command. I am not meaning this:

a=$(echo "b")
echo "$a"
N00b
  • 148
  • 11
  • Maybe you could put something together with `read`, `tee`, and `<(...)` however, that would probably be longer and more complicated. Is there any reason (other than brevity) not to use `a=$(...); echo "$a"`? – Socowi Nov 16 '18 at 11:58
  • I have get it like that because of another program syntax that I have to use on my program. Also it can be printf. – N00b Nov 16 '18 at 12:01
  • I don't understand. What other program syntax? – Socowi Nov 16 '18 at 12:03
  • I have to use another code or program on my own code and I am calling it. I have reasons that i cannot show that another code to you. – N00b Nov 16 '18 at 12:24

0 Answers0