title: Need to validate my understanding of how sed is editing this file
body: <p>This is the file which is being edited by sed:</p>
  
  <pre><code># cat flyway.conf.j2
  flyway.url=jdbc:postgresql://{{ DB_HOST }}:5432/{{ DB_NAME }}?currentSchema=fm_fmp
  flyway.user={{ FLYWAY_USER }}
  flyway.password={{ FLYWAY_PASSWORD }}
  </code></pre>
  
  <p>This is the code snippet and the comments are my understanding of the code, is my understanding correct, also how is ##*/ getting the basename of the directory:</p>
  
  <pre><code># To get the last dir in current working directory, and if you want to do it completely within a bash script without running any external binaries
  SCHEMA=${PWD##*/}    
  #sed -i means inplace, alnum means alphanumeric, 1s (Only search and replace 1st line) searching for string =any_alpha_numeric then _ then {}, 
      # then *$ meaning to the end and replace with value of variable $SCHEMA 
      sed -i "1s/=[[:alnum:]_{} ]*$/=${SCHEMA}/" flyway.conf.j2
  </code></pre>