I have a file that looks like this:
AE United Arab Emirates AG Antigua & Barbuda AN Netherlands Antilles AS American Samoa BA Bosnia and Herzegovina
$1="" leaves a space as Ben Jackson mentioned, so use a for loop:
$1=""
for
awk '{for (i=2; i<=NF; i++) print $i}' filename
So if your string was "one two three", the output will be:
two three
If you want the result in one row, you could do as follows:
awk '{for (i=2; i
This will give you: "two three"