Q:

Bash command to convert IP addresses into their "reverse" form?

When I run nslookup on an IP (These are all examples)
nslookup 192.168.1.123

Current output:
411.311.211.111

Desired output:
111.211.311.411

I have a script that works just seeing if there's a more efficient way or a built-in nslookup command.
Thanks

A:

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}'

