-
Notifications
You must be signed in to change notification settings - Fork 0
Shell script
jaeseok.an edited this page May 3, 2019
·
8 revisions
- bash associative array(map)
$ declare -A MYMAP # Create an associative array
$ MYMAP[foo]=bar # Put a value into an associative array
$ echo ${MYMAP[foo]} # Get a value out of an associative array
bar
$ echo MYMAP[foo] # WRONG
MYMAP[foo]
$ echo $MYMAP[foo] # WRONG
[foo]
not regular expression pattern
${variable//pattern/replacement}
regular expression
if [[ $bpname =~ "BP*" ]]; then
뒤에서 lonngest match = %%, 짧은 match =%, 앞에서 match=#으로 변경
bpname=${file%%.toml}
if [ ! -e genesis -o ! -e genesis.json ];
- json parser
- jq
- 특정 필드는 jq .필드명 으로 출력가능하다
- jq
test