On Mon, May 01, 2023 at 02:24:18AM +0200, cor...@free.fr wrote:
> Hello list,
>
> I wrote this script for reversing an IP:
>
> #!/bin/bash
>
> IP=$1
>
> if [ -z $IP ];then
> echo "$0 IP"
> exit 1
> fi
>
> REVERSE=$(echo $IP|awk -F\. '{print $4.$3.$2.$1}')
> echo $REVERSE
>
>
> it won't w
On Mon 01 May 2023 at 02:24:18 (+0200), cor...@free.fr wrote:
> I wrote this script for reversing an IP:
$ IP='12.34.56.78'
$ sed -E
's/([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/\4.\3.\2.\1/'
<<<"$IP"
78.56.34.12
$
or REVERSE="$(↑↑↑that stuff↑↑↑)"
Cheers,
David.
On 4/30/23, cor...@free.fr wrote:
> Hello list,
>
> I wrote this script for reversing an IP:
>
> #!/bin/bash
>
> IP=$1
>
> if [ -z $IP ];then
>echo "$0 IP"
>exit 1
> fi
>
> REVERSE=$(echo $IP|awk -F\. '{print $4.$3.$2.$1}')
> echo $REVERSE
>
>
> it won't work as the output below.
>
> $ bin
On 1/5/23 08:24, cor...@free.fr wrote:
Hello list,
I wrote this script for reversing an IP:
#!/bin/bash
IP=$1
if [ -z $IP ];then
echo "$0 IP"
exit 1
fi
REVERSE=$(echo $IP|awk -F\. '{print $4.$3.$2.$1}')
echo $REVERSE
it won't work as the output below.
$ bin/rbl.sh 61.144.56.32
32561
4 matches
Mail list logo