How can I remove a space located between name and lastname from a string by using awk?
most of the examples are about redirecting data from command line to awk but I need to manipulate a string inside an awk script.
Convert this:
"steve john"
to:
"stevejohn"
I have a string variable which I asked user to input inside an awk script. I need to remove the spaces.
gsubis your friend. The following command basically does a global substitution of a regular expression (a single space in this case), replacing it with an empty string, on the target$0(the whole line).You can use any target, including one input by a user: