Thread
: [Solved]
Shell store or return output of a command in a variable
View Single Post
#
1
(
permalink
)
04-07-2009, 11:40 AM
chimu
Contributors
User
Join Date: Mar 2005
OS: Ubuntu
Posts: 79
Thanks: 23
Thanked 4 Times in 3 Posts
Rep Power:
6
Shell store or return output of a command in a variable
I can store command output using $(cmd) or `cmd`. But how do get stdout+stderr in a variable? Also, some script has $?
Code:
ret=$? return $ret
ret stores $? but why?
Last edited by nixcraft; 06-07-2009 at
10:54 AM
.
chimu
View Public Profile
Find all posts by chimu