title: mac os: How do I run a multi-line script on command line?
body: <p>I have a python file that isn't working.</p>
  
  <p>I would like to run this script on it:</p>
  
  <pre><code>with open('beak', 'rb+') as f:
      content = f.read()
      f.seek(0)
      f.write(content.replace(b'\r', b''))
      f.truncate()
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/19425857/env-python-r-no-such-file-or-directory">Source</a></p>
  
  <p>I don't know how to make multiple lines on command line and I am not really sure how to execute my code. Do I just put my file name in place of 'beak' and do I just cd to the folder my file is in before I execute this script?</p>