Example regex and writing This is just a very simple regex example of line-bye-line (bufio.Scanner) extracting bashvariables in a bash script (just strings, not arrays). A file is then created and then each line is appended.