Bash command to convert IP addresses into their "reverse" form?
echo 411.311.211.111 | awk -F. '{print $4"."$3"." $2"."$1}'
Output:
111.211.311.411
or
echo 411.311.211.111 | awk -F. '{OFS="."; print $4,$3,$2,$1}'
echo 411.311.211.111 | awk -F. '{print $4"."$3"." $2"."$1}'
Output:
111.211.311.411
or
echo 411.311.211.111 | awk -F. '{OFS="."; print $4,$3,$2,$1}'