bash – iterating over a string array
123456789101112131415#declare -a myArrayList=( myArrayList=( # NEW ENTRIES BELOW THIS LINE Judy Bob "Adam Smith" Bonnie # NEW ENTRIES ABOVE THIS LINE ) ## IF YOU HAVE SPACES IN THE ITEMS … Read More
123456789101112131415#declare -a myArrayList=( myArrayList=( # NEW ENTRIES BELOW THIS LINE Judy Bob "Adam Smith" Bonnie # NEW ENTRIES ABOVE THIS LINE ) ## IF YOU HAVE SPACES IN THE ITEMS … Read More
Source: http://www.thegeekstuff.com/2010/07/bash-string-manipulation/ Other options: replace, shortest, longest, etc. See full POST FOR DETAILS. 3. Shortest Substring Match Following syntax deletes the shortest match of $substring from front of $string ${string#substring} Following syntax … Read More