update shell with head or tail