title: How can I pass a multi-line string with quotes on a shell command line?
body: <p>I have two scripts and want to call the tester script from the terminal.</p>
  
  <pre><code>string s = """ output/directory/366d595b-23b2-435d-8dc6-698b3d0844b9/result.csv scores=[{
     "base_score": 0.92,
     "metric": "ACCURACY"
      }]"""
  </code></pre>
  
  <p>Script #1 (script1.py)- consists of a function that parses a string</p>
  
  <pre><code>    def parser_score(s):
           dict_txt = re.search('\[([^]]+)', s).group(1).strip()
           data = json.loads(dict_txt)
           return data
  </code></pre>
  
  <p>Script #2(script2.py) - calls script #1 and saves the result in a json file</p>
  
  <pre><code>    import sys
      from parser_for_score_v3 import parser_score
  
      s = sys.argv[1]
      print(s)
  
      result = parser_score(s)
  
      # save dict to a json file
      with open('result.json', 'w') as fp:
           json.dump(result, fp)
  </code></pre>
  
  <p>I call the second script from the terminal - </p>
  
  <pre><code>    abc $ python script2.py """output/directory/366d595b-23b2-435d-8dc6-698b3d0844b9/result.csv scores=[{
     "base_score": 0.92,
      "metric": "ACCURACY"
      }]"""
  </code></pre>
  
  <p>I get an error: AttributeError: 'NoneType' object has no attribute 'group'
  -bash: base_score:: command not found</p>
  
  <ol>
  <li>How can I pass the string ( such a long multi-line string) to a python script from the terminal? Text file is not an option. </li>
  <li>How can I modify the regex to read a string with or without quotes? </li>
  </ol>
  
  <p>Thanks in advance. </p>