Skip to content

Instantly share code, notes, and snippets.

@ztrayner
Forked from dallinskinner/search_blocks.sh
Last active November 21, 2017 23:17
Show Gist options
  • Save ztrayner/3bd0e80ea0a5f0b3f8a4f0ef5efd8570 to your computer and use it in GitHub Desktop.
Save ztrayner/3bd0e80ea0a5f0b3f8a4f0ef5efd8570 to your computer and use it in GitHub Desktop.
Search content of blocks
#Usage: search_blocks.sh SITE TERM
#Where SITE is chart or press and TERM is whatever you're looking for.
#!/bin/bash
ssh lucid 'mysql '$1'_drupal -e "SELECT bid, info, CONCAT('\''https://zach.office.lucid'$1'.com/pages/admin/structure/block/manage/block/'\'', bid, '\''/configure'\'') as url FROM block_custom WHERE body LIKE '\''%'$2'%'\''\G"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment