aboutsummaryrefslogtreecommitdiff
path: root/shell01/ex08/add_chelou.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shell01/ex08/add_chelou.sh')
-rwxr-xr-xshell01/ex08/add_chelou.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/shell01/ex08/add_chelou.sh b/shell01/ex08/add_chelou.sh
new file mode 100755
index 0000000..7cb1112
--- /dev/null
+++ b/shell01/ex08/add_chelou.sh
@@ -0,0 +1,14 @@
+echo $FT_NBR1
+B10_1=$(echo $FT_NBR1 | tr "'\\$(echo '\"')?!" "43210")
+echo $B10_1
+echo $FT_NBR2
+B10_2=$(echo $FT_NBR2 | tr "mrdoc" "43210")
+echo $B10_2
+
+B5_ADD=$(echo "ibase=5; obase=5; $B10_1 + $B10_2" | bc)
+echo "ibase=5;obase=13; $B5_ADD" | bc
+# ADD=$(echo "ibase=5; obase=13; $B10_1 + $B10_2" | bc)
+# echo $ADD
+
+ADD_CONV=$(echo $B5_ADD | tr "0123456789ABC" "gtaio luSnemf")
+echo $ADD_CONV