Grab Both stderr And stdout Of Command Link to heading
Assign stderr
and stdout
of a command to a variable in bash
out=$(zk new -t "title" -n 2>&1)
stderr=$(echo "$out" | head -n 1)
stdout=$(echo "$out" | tail -n +2)
Assign stderr
and stdout
of a command to a variable in bash
out=$(zk new -t "title" -n 2>&1)
stderr=$(echo "$out" | head -n 1)
stdout=$(echo "$out" | tail -n +2)