From abf1b7ce0738bd698a776614dd9165a5466de4da Mon Sep 17 00:00:00 2001 From: Benji Date: Tue, 17 Nov 2026 16:10:02 +0100 Subject: [PATCH] sync: 2026-11-17 16:10 --- SCR/SCR1.2/TP08/bin2dot-with-for.sh | 13 +++++++------ SCR/SCR1.2/TP08/ipv4.txt | 3 +++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 SCR/SCR1.2/TP08/ipv4.txt diff --git a/SCR/SCR1.2/TP08/bin2dot-with-for.sh b/SCR/SCR1.2/TP08/bin2dot-with-for.sh index 464993c..e2859aa 100755 --- a/SCR/SCR1.2/TP08/bin2dot-with-for.sh +++ b/SCR/SCR1.2/TP08/bin2dot-with-for.sh @@ -4,11 +4,12 @@ if [[ $# -lt 2 ]]; then echo "usage: $0 " exit 1 fi - +echo -n "" >$2 for line in $(cat $1); do - l1=$(expr substr 1 8) - l2=$(expr substr 9 8) - l3=$(expr substr 18 8) - l4=$(expr substr 26 8) - echo "$((2#$l1)).$((2#$l2)).$((2#$l3)).$((2#$l4))." + l1=$(expr substr $line 1 8) + l2=$(expr substr $line 9 8) + l3=$(expr substr $line 18 8) + l4=$(expr substr $line 26 8) + echo "$((2#$l1)).$((2#$l2)).$((2#$l3)).$((2#$l4))" >>$2 + done diff --git a/SCR/SCR1.2/TP08/ipv4.txt b/SCR/SCR1.2/TP08/ipv4.txt new file mode 100644 index 0000000..1447002 --- /dev/null +++ b/SCR/SCR1.2/TP08/ipv4.txt @@ -0,0 +1,3 @@ +178.226.14.114 +229.197.178.82 +50.230.8.114