use read, fix bash specifities