- 14paxton/Linux Wiki

use a string put int script that needs a user response

echo $GH_TOKEN | gh auth login --with-token;

use output from a script to set a variable

tee can be used to create a file from output here i take the out put pipe that and error output which is 2 >&1 piped into stnd out

File descriptor 1 is the standard output (stdout). File descriptor 2 is the standard error (stderr).

2> redirects stderr to an (unspecified) file. &1 redirects stderr to stdout.