When I run the following
awk -F\, '{print $2,":",$1}'
It prints
"First : Second"
How can I get
"First:Second"
Just put your desired field separator with the -F option in the AWK command and the column number you want to print segregated as per your mentioned field separator.
txt. If you notice awk 'print $1' prints first word of each line. If you use $3, it will print 3rd word of each line.
awk '{ print $2; }' prints the second field of each line. This field happens to be the process ID from the ps aux output. xargs kill -${2:-'TERM'} takes the process IDs from the selected sidekiq processes and feeds them as arguments to a kill command.
Omit the ,
s
awk -F\, '{print $2 ":" $1}'
Try this:
awk -F\, '{print $2":"$1}'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With