Tag: scripting

concatenate a file list into a string

Example 1kreese@myvps:arp $ 206.188

ternary example

Just a quick little example on ternary bash syntax. [[ $member = *mongodbarb* ]] && port=30000 || port=27017 Examplereese@MacBook ~ $ node=webserver01 reese@MacBook ~ $ [[ $node = *webserver*

expand alias in shell script

Defining an alias within a shell scriptIf there’s a need to define an alias within a shell script, shopt needs to be defined to tell the script to expand the alias. This option is enabled by default