help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is there a way to save stdout and stderr to two bash variables?


From: Peng Yu
Subject: is there a way to save stdout and stderr to two bash variables?
Date: Sun, 10 May 2020 16:55:25 -0500

x=$(cmd)

The above syntax can only save stdout to a bash variable. Is there a
way to save the stdout and stderr of the command to two different bash
variables? Thanks.

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]