Hello, I am running a command using pipe, say
echo stats | nc hostname.com 1001
and then I am getting the output of $? as 0. so here $? is depends on which command? echo or nc?? for getting $? 0 does both command needs to be executed successfully or either of nc or echo would do? how does $? gets evaluated in piping. Thanks!