Following function hangs :
ssh() {
local RESULTS;
RESULTS=$(ssh $USERNAME@$SERVER $SSH_COMMAND1);
echo $RESULTS;
}
ssh;
while if i run following commands they work fine :
RESULTS=$(ssh $USERNAME@$SERVER $SSH_COMMAND1);
echo $RESULTS;
Can someone please guide me to the right direction of looking for error?