I am trying to add column with the name of the file into the end of each line. Every line has a
Name Surname some_number
Name and surname are separated with space and number is separated from Surname by tab.
I am doing it with this script but it does not work, it only adds filename to start of the line.
$1=temp
nawk -v F'\t' -v OFS='\t' '{$2=$2" "$temp} 1' $temp
PS OS is SunOS.
Try with: