def stringMap = "['a':['c':'true'],'b':4]" def map = evaluate(stringMap)
Monday, June 10, 2013
string map to actual #groovy map
Convert a string map representation to a groovy map, for further manipulation
#bashing multiple expressions
So to do a couple of cool stuff in bash use the [[ many-expressions ]] brackets not the [ expression ]
For example one can do multiple expressions
For example one can do multiple expressions
if [[ foo || bar || baz ]] ; then ... fiFor more info look at this stackoverflow
if elif else fi #bashing about
When running a webservice one needs a couple of good scripts that make work easier.
I have been using bash scripts for just that..
Bash is one of the weirdest languages i have had to learn...stuff isn't that straight forward. I hade to google this stuff up
I have been using bash scripts for just that..
Bash is one of the weirdest languages i have had to learn...stuff isn't that straight forward. I hade to google this stuff up
If [ conditional expression1 ] then statement1 statement2 . elif [ conditional expression2 ] then statement3 statement4 . . . else statement5 fiI wont take all the credit, I got the info from HERE
Friday, June 7, 2013
adding stuff in bash
I just stumbled on a how to add stuff in bash
total=`expr $val_1 + $val_2 + $val_3`
Subscribe to:
Posts (Atom)