I have a text file with three columns, and i want to add another one with the number of letters in the first column
I tried using the awk command: awk ‘{print $0, length($1)}’ file.txt
But it doesnt appears another column, it just rewrite it in the first one
If I use: awk ‘{print $0, length($1)}’ file.txt > file2.txt, it shows that the command created another line, not column.
New contributor
Juan Guillermo Rubiano is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2