#!/bin/bash
ARRAY="185.18.207.66 31.18.212.113"
result=""
for i in $ARRAY
do
result=$(printf '%s %s' "$result" "$i" "checked")
done
paste <(printf "%s\n" $result)
I am trying to print IP addresses but with appending "checked"
phrase for each IP address.
But I can not print a space between IP and "checked"
phrase
Above code prints:
185.18.207.66checked
31.18.212.113checked
How can I make it to print like below?
185.18.207.66 checked
31.18.212.113 checked