Bash 10진수를 2진수로 변환
dectobin () { num=$1 rem=1 bno="" while [ $num -gt 0 ] do rem=`expr $num % 2` bno=$bno$rem num=`expr $num / 2` done i=`echo ${#bno}` final="" while [ $i -gt 0 ] do i=$(( $i - 1 )) rev=`echo ${bno:$i:1}` final=$final$rev done final=`printf "%08d" $final` echo $final }
프로그래밍
2020. 3. 6. 22:50
warpmemory
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
페이지
TAG
- example
- PowerShell
- engineering
- Module
- 코드
- command
- code
- error
- 예제
- 이슈처리
- 번역
- deview
- client
- check
- apache
- monitoring
- File
- RESTful
- 외부링크
- limits
- Python
- Web
- Ansible
- mysql
- 명령어
- Windows
- MariaDB
- Linux
- httpd
- configuration
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함