input: Write a function to install a given software using Bash. The function should download the specified version of the software, extract it, configure it, compile it, and then install it. The function should be named `install_software`.
  assert install_software("Python 3.8.5")=="#!/bin/bash\n\n# Download latest version of Python\ncurl -O https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz\n\n# Extract the tgz file\ntar -xzf Python-3.8.5.tgz\n\n# Move into the Python directory\ncd Python-3.8.5\n\n# Run the configure script\n./configure\n\n# Compile and install\nmake\nmake install"
  assert install_software("Node.js 14.17.0")=="#!/bin/bash\n\n# Download latest version of Node.js\ncurl -O https://nodejs.org/dist/v14.17.0/node-v14.17.0.tar.gz\n\n# Extract the tar.gz file\ntar -xzf node-v14.17.0.tar.gz\n\n# Move into the Node.js directory\ncd node-v14.17.0\n\n# Run the configure script\n./configure\n\n# Compile and install\nmake\nmake install"
  assert install_software("")==None
  assert install_software("InvalidSoftware 1.0")==None
output: def install_software(software):
      if not software:
          return None
      parts = software.split()
      if len(parts) != 2:
          return None
      name, version = parts
      if name == "Python":
          url = f"https://www.python.org/ftp/python/{version}/Python-{version}.tgz"
          filename = f"Python-{version}.tgz"
          directory = f"Python-{version}"
      elif name == "Node.js":
          url = f"https://nodejs.org/dist/v{version}/node-v{version}.tar.gz"
          filename = f"node-v{version}.tar.gz"
          directory = f"node-v{version}"
      else:
          return None
      return f"#!/bin/bash\n\n# Download latest version of {name}\ncurl -O {url}\n\n# Extract the tgz file\ntar -xzf {filename}\n\n# Move into the {name} directory\ncd {directory}\n\n# Run the configure script\n./configure\n\n# Compile and install\nmake\nmake install"