Created
April 17, 2024 14:22
-
-
Save teadur/884fa66d0a4c518cd5d4907bdb641d0a to your computer and use it in GitHub Desktop.
rev.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input=$1 | |
function reverseip () { | |
local IFS | |
IFS=. | |
set -- $1 | |
echo $4.$3.$2.$1 | |
} | |
reverseip $input |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment