You can do:
$ echo "./country-flag vendor/country-flag" | awk '/[[:blank:]]/{print $2}'
vendor/country-flag
More typical in awk (since it, by default splits on [[:space:]]
already) is to use the NF
variable that denotes the number of fields in the current record:
$ echo "./country-flag vendor/country-flag" | awk 'NF>1{print $2}'
vendor/country-flag
With sed
you just delete the first field:
echo "./country-flag vendor/country-flag" | sed -E 's/^[^[:space:]]*[[:space:]]*//'
If you want to print a line with no spaces unmodified but only after the first space if there is one:
echo "./country-flag vendor/country-flag
./country-flagvendor/country-flag" |
sed -E '/^[^[:space:]]*$/n; s/^[^[:space:]]*[[:space:]]*//'
Prints:
vendor/country-flag
./country-flagvendor/country-flag