This commit is contained in:
2024-09-10 15:13:11 +02:00
commit 778bb476fa
140 changed files with 6123 additions and 0 deletions

20
SCR1.2/TP08/bin2dot-with-for.sh Executable file
View File

@@ -0,0 +1,20 @@
if [[ $# -lt 2 ]]
then echo "usage: $0 <SRC_FILE> <DEST_FILE>"
exit
fi
if [[! -f $1]]
then echo "$1 doesn't exist or is not regular"
exit
fi
for addr in $(cat$1)
do
x=$(expr substr $addr 1 8)
y=$(expr substr $addr 9 8)
z=$(expr substr $addr 17 8)
t=$(expr substr $addr 25 8)
addr_dot=$((2#$x)).$((2#$y)).$((2#$z)).$((2#$t))
echo $addr_dot
done>$2
exit