#!/bin/bash ## usage: bash cleanup-Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace.sh vi ## usage: bash cleanup-Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace.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.CloseBracketSpacing.ClosingWhitespace' echo Number of lines: 6 echo Examples: 'Array ( [0] => There should be no white space before a closing \")\" ) ' echo Press ENTER to begin read edit_at_line 'api/v3/Job.php' 584 edit_at_line 'api/v3/Job.php' 585 edit_at_line 'api/v3/Job.php' 586 edit_at_line 'api/v3/Job.php' 587 edit_at_line 'tests/qunit/example/test.js' 5 edit_at_line 'tests/qunit/example/test.js' 10