[bash] add head and tail