Skip to content

Instantly share code, notes, and snippets.

@teadur
Created April 17, 2024 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teadur/884fa66d0a4c518cd5d4907bdb641d0a to your computer and use it in GitHub Desktop.
Save teadur/884fa66d0a4c518cd5d4907bdb641d0a to your computer and use it in GitHub Desktop.
rev.sh
#!/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