bash, extract string before a colon January 23, 2023 by Tarik cut -d: -f1 or awk -F: '{print $1}' or sed 's/:.*//'