core-utils stuff in bash