use cat instead of type, perhaps this increases output buffer
fixed  to give value per command line