awk print without spaces code example
Example: awk how to print without adding spaces between fields
# Short answer:
# If you're getting unwanted spaces between the items you're printing
# with awk you probably need to remove commas between the items.
# Example of problem:
awk '{print $1, "some-text", $2}' file_to_parse # $1 and $2 are the
# first and second fields/columns of the the file_to_parse
--> field_1 some text field_2 # Output
# If you didn't want spaces, remove the commas:
awk '{print $1 "some-text" $2}' file_to_parse
--> field_1some-textfield_2 # Output