#!/bin/bash ## usage: bash cleanup-Drupal.WhiteSpace.Comma.NoSpace.sh vi ## usage: bash cleanup-Drupal.WhiteSpace.Comma.NoSpace.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.WhiteSpace.Comma.NoSpace' echo Number of lines: 10 echo Examples: 'Array ( [0] => Expected one space after the comma, 0 found ) ' echo Press ENTER to begin read edit_at_line 'CRM/Logging/ReportSummary.php' 192 edit_at_line 'api/v3/Generic/Setvalue.php' 70 edit_at_line 'api/v3/GroupContact.php' 226 edit_at_line 'api/v3/Job.php' 416 edit_at_line 'api/v3/LineItem.php' 52 edit_at_line 'api/v3/Mailing.php' 207 edit_at_line 'api/v3/MailingContact.php' 70 edit_at_line 'api/v3/MailingContact.php' 91 edit_at_line 'api/v3/MailingEventQueue.php' 56 edit_at_line 'api/v3/Membership.php' 211