How to parse mysql query output as variable into another command in linux via Drush?
Based on the query that you've provided, you're just getting one unpublished feed_item, then deleting it. This can be done in one line, without an intermediate bash step.

drush ev "node_delete(
  db_select('node')
    -&gt;fields('node', array('nid'))
    -&gt;condition('status', '0', '=')
    -&gt;condition('type', 'feed_item', '=')
    -&gt;range(0, 1)
    -&gt;execute()
    -&gt;fetchField()
);"


If you wanted to delete multiple nodes at once - or all nodes returned with your conditions, then use https://api.drupal.org/api/drupal/modules%21node%21node.module/function/node_delete_multiple/7 , remove the range and use fetchCol() to return an array of NIDs.

drush ev "node_delete_multiple(
  db_select('node')
    -&gt;fields('node', array('nid'))
    -&gt;condition('status', '0', '=')
    -&gt;condition('type', 'feed_item', '=')
    -&gt;execute()
    -&gt;fetchCol()
);"