#!/bin/bash ## usage: bash cleanup-Drupal.CSS.ColourDefinition.NotLower.sh vi ## usage: bash cleanup-Drupal.CSS.ColourDefinition.NotLower.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.CSS.ColourDefinition.NotLower' echo Number of lines: 1 echo Examples: 'Array ( [0] => CSS colours must be defined in lowercase; expected #a70 but found #A70 ) ' echo Press ENTER to begin read edit_at_line 'install/template.css' 54