bash: modify cdgem