Solving the issue as it is presented in the title, i.e. removing double quotes from the first space-delimited column, only:
awk -F ' ' '{ gsub("\"", "", $1) }; NR > 1' file
This uses the gsub()
command to remove all double quotes from the first field on each line. The NR > 1
at the end makes sure that the first line is not printed.
To remove the double quotes from the first field, but only if they appear as the first and last character of the field:
awk -F ' ' '$1 ~ /^".*"$/ { $1 = substr($1, 2, length($1) - 2) }; NR > 1' file
This uses a regular expression, ^".*"$
to detect whether there are double quotes at the start and end of the first field, and if there are, a block that extracts the internal part of the string with substr()
is triggered. Any internal double quotes in the field are retained.