Last active
September 16, 2022 04:34
-
-
Save sng2c/2fd34a29ccaeb799f1215627472fda88 to your computer and use it in GitHub Desktop.
일주
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DAY=0 | |
if [[ $4 == "음" ]]; then | |
DAY=1 | |
fi | |
if [[ $4 == "윤" ]]; then | |
DAY=2 | |
fi | |
HAN=$(curl 'http://sajuplus.com/manse.html' -s \ | |
--data-raw "inName=noname&inSex=m&inDateType=$DAY&inYY=$1&inMM=$2&inDD=$3&inMI=8&inSS=0" \ | |
| sed 's/[^甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳午未申酉戌亥]//g' | awk 'NF' | sed -n -e '2 p' -e '6 p' | tr -d '\n' ) | |
echo $HAN | |
echo $HAN | tr '甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳午未申酉戌亥' '갑을병정무기경신임계자축인묘진사오미신유술해' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage : ilju.sh Y M D [음|윤]
http://sajuplus.com/manse.html 을 이용
음력윤달 참고 https://jaeho0523.tistory.com/1005