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
cur=$(date +%m) # Need not be described | |
next6=$(printf %02d $(echo $(($cur+6))%12 | bc)) | |
# 1. $(($cur+6)) is same 'expr' command. result is 7 | |
# 2. echo 7%12 | bc result '7' (remainder) | |
# 3. printf %02d => 01, 02, 03 ... | |
# 4. $next6 => current month + 6 | |
# 5. My mistake, if $next6 is 0 => change 1 (if [ $next6 == 0 ];then next6=1;fi) | |
# 6. END |
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/sh | |
AA="My name is oops" | |
BB="name" | |
if [[ "$AA" == *"name"* ]];then | |
echo "1st find it" | |
fi | |
if [[ "$AA" =~ "name" ]];then |
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
<?php | |
// 출처 : https://blog.whitehatsec.com/magic-hashes/ | |
if (hash('md5','240610708',false) == '0') { | |
print "Matched.\n"; | |
} | |
if ('0e462097431906509019562988736854' == '0') { | |
print "Matched.\n"; | |
} | |
?> |
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/sh | |
echo "=================" | |
echo "\$@ section" | |
echo "=================" | |
for param in "$@" | |
do | |
echo $param, | |
done |
NewerOlder