Tag: scripting

concatenate a file list into a string

Example 1kreese@myvps:arp $ 205.178.186.72 205.178.136.60 205.178.136.72 205.178.136.91 205.178.136.109 205.178.136.132 205.178.136.166 205.178.186.206 205.178.186.220 206.188.212.32 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