#!/bin/bash ## usage: bash cleanup-Drupal.ControlStructures.ControlSignature.sh vi ## usage: bash cleanup-Drupal.ControlStructures.ControlSignature.sh joe [ -n "$1" ] && EDITOR="$1" if [ -z "$EDITOR" ]; then echo "Please provide parameter 1 (editor). Example: vi, joe" exit 1 fi function edit_at_line() { local f="$1" local l="$2" $EDITOR +$l "$f" } echo Process cleanup for 'Drupal.ControlStructures.ControlSignature' echo Number of lines: 7 echo Examples: 'Array ( [0] => Expected \"elseif (...) {\n\"; found \"elseif(...) {\n\" [1] => Expected \"foreach (...) {\n\"; found \"foreach(...) {\n\" [2] => Expected \"if (...) {\n\"; found \"if (...)\n {\n\" [3] => Expected \"if (...) {\n\"; found \"if(...) {\n\" ) ' echo Press ENTER to begin read edit_at_line 'api/v3/Profile.php' 118 edit_at_line 'api/v3/Profile.php' 450 edit_at_line 'api/v3/Profile.php' 464 edit_at_line 'api/v3/Profile.php' 647 edit_at_line 'api/v3/utils.php' 1429 edit_at_line 'api/v3/utils.php' 1795 edit_at_line 'api/v3/utils.php' 1849