sync: 2026-11-17 17:15

This commit is contained in:
Benji committed 2026-11-17 17:15:07 +01:00
1 parent 83d12ac39e
commit a02c7470c3
3 files changed
+34 -5

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#!/bin/bash
if [[ $# -lt 2 ]]; then
echo "usage: $0 <SRC_FILE> <DST_FILE>"
exit 1
fi
if [[ -s $2 ]]; then
read -p "$2 exists. Overwrite? Yes/No --> " -r choice
if [[ $choice = "Yes" ]]; then
echo "overwriting $2 !"
echo -n "" >$2
fi
fi
while [[ ]]; do
if [[ $(expr length $line) -eq 32 ]]; then
l1=$(expr substr $line 1 8)
l2=$(expr substr $line 9 8)
l3=$(expr substr $line 17 8)
l4=$(expr substr $line 25 8)
echo "$((2#$l1)).$((2#$l2)).$((2#$l3)).$((2#$l4))" >>$2
else
echo "Invalid format for : $line the string isn't 32bits long"
fi
done