Can anyone tell me why the while loop in the below code affects the setting of the variable RC? I'm at a loss. Remove the while loop, and it works just fine... -- #!/bin/bash function getRC { RC="123" } getRC \ | while read line do echo "456" done echo "RC: $RC"