title: netmiko can't execute 'sh run | i host'
body: <p>I notice that my netmiko code can't run <code>sh run | i host</code> which is a legitimate Cisco command.</p>
  
  <p>When I replace <code>sh run</code> with other command such as <code>sh clo</code>, or <code>show ip interface brief</code>, it works perfectly.</p>
  
  <pre><code>from netmiko import ConnectHandler
  
  R1 = {
      'device_type': 'cisco_ios',
      'ip': 'Router1',
      'username': 'u',
      'password': 'p'
  }
  
  R2 = {
      'device_type': 'cisco_ios',
      'ip': 'Router2',
      'username': 'u',
      'password': 'p'
  }
  
  all_devices = [R1, R2]
  
  for device in all_devices:
      connect = ConnectHandler(**device)
      output = connect.send_command('sh run | i host')
      print(output)
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>user@linux:~$ python3 script.py 
  ^
  % Invalid input detected at '^' marker.
  
  ^
  % Invalid input detected at '^' marker.
  
  user@linux:~$ 
  </code></pre>
  
  <p>Desired Output</p>
  
  <pre><code>hostname Router1
  hostname Router2
  </code></pre>
  
  <p>Any idea why this code behave this way?</p>