improving bash syntax