SCR/SCR.1.2/TP08/bin2dot_with_for.sh

12 lines
238 B
Bash
Raw Permalink Normal View History

2022-11-16 09:17:18 +01:00
#!/bin/bash
input=$1
current=0
for addr in $(cat $1) ; do
w=$(expr substr $addr 1 8)
x=$(expr substr $addr 9 8)
y=$(expr substr $addr 17 8)
z=$(expr substr $addr 25 8)
echo "$((2#$w)).$((2#$x)).$((2#$y)).$((2#$z))" >> $2
done
exit