programing/shell script (2) 썸네일형 리스트형 shell script(쉘 스크립트) - 날짜, 시간 #!/bin/bash # 날짜포맷 Format Description %% a literal % %a locale’s abbreviated weekday name (e.g., Sun) %A locale’s full weekday name (e.g., Sunday) %b locale’s abbreviated month name (e.g., Jan) %B locale’s full month name (e.g., January) %c locale’s date and time (e.g., Thu Mar 3 23:05:25 2005) %C century; like %Y, except omit last two digits (e.g., 21) %d day of month (e.g, 01) %D date; same as.. shell script(쉘 스크립트) - 사칙연산 #!/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 이전 1 다음