not sure all the explicit returns are needed - why not `if ! version then echo n/a else echo version; fi`? (with proper bash of course)