#!/bin/bash
sample_number1=10
sample_number2=6
#더하기
plus=`expr $sample_number1 + $sample_number2`
#결과 : 16
#빼기
minus=`expr $sample_number1 - $sample_number2`
#결과 : 4
#곱셈
multiplication=`expr $sample_number1 \* $sample_number2`
#결과 : 60
#나눗셈
division=`expr $sample_number1 / $sample_number2`
#결과 : 1
#나머지
remainder=`expr $sample_number1 % $sample_number2`
#결과 : 4
'programing > shell script' 카테고리의 다른 글
shell script(쉘 스크립트) - 날짜, 시간 (0) | 2019.04.11 |
---|