From fe3473a29bea2123d345ef09bfc0cde784d28a73 Mon Sep 17 00:00:00 2001 From: Colin Johnson Date: Fri, 9 Nov 2012 04:35:39 +0000 Subject: [PATCH] purge_EBS_Snapshots more portable - \t option does not work with grep (GNU grep) 2.10 from Ubuntu 12.04.1 LTS. --- ec2-automate-backup/ec2-automate-backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ec2-automate-backup/ec2-automate-backup.sh b/ec2-automate-backup/ec2-automate-backup.sh index cb661f7..2ebcb58 100755 --- a/ec2-automate-backup/ec2-automate-backup.sh +++ b/ec2-automate-backup/ec2-automate-backup.sh @@ -93,7 +93,7 @@ purge_EBS_Snapshots() #snapshot_tag_list is a string that contains all snapshots with either the key PurgeAllow or PurgeAfter set snapshot_tag_list=`ec2-describe-tags --show-empty-fields --region $region --filter resource-type=snapshot --filter key=PurgeAllow,PurgeAfter` #snapshot_purge_allowed is a list of all snapshot_ids with PurgeAllow=true - snapshot_purge_allowed=`echo "$snapshot_tag_list" | grep .*PurgeAllow'\t'true | cut -f 3` + snapshot_purge_allowed=`echo "$snapshot_tag_list" | grep .*PurgeAllow'\s'true | cut -f 3` for snapshot_id_evaluated in $snapshot_purge_allowed do