awk delimiter and field # Prints the first field for delimiter || echo "f1||f2" |awk -F'\\|\\|' '{print $1}' f1