purge_EBS_Snapshots more portable - \t option does not work with grep (GNU grep) 2.10 from Ubuntu 12.04.1 LTS.
This commit is contained in:
parent
8ff051d42a
commit
fe3473a29b
|
@ -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 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_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 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
|
for snapshot_id_evaluated in $snapshot_purge_allowed
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user