Then I call command in my bash script like command
it's outputs to my terminal but isn't saving anywhere. If I want to save output I use output=$(command)
but now command output isn't showing to my screen unless command
would be completed so I can call echo "${output}"
. But the problem is: I don't want to wait until command will be completed. So, is there any way to call command
, show output while it's running and later save everything to a variable?
It could work, if I call it twice:
command
output=$(command)
but it's not that good I think.
sry for my engrish.