Skip to content

Commit

Permalink
Create aws_start wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
maxiwell committed Apr 3, 2023
1 parent f59a065 commit 2df5f39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions home/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,4 @@ PROMPT_COMMAND="run_on_prompt_command"
# Remove PATH duplicates
PATH=$(printf %s "$PATH" | awk -v RS=: -v ORS=: '{ if (!arr[$0]++) { print $0 } }')

source ~/.private_bashrc
4 changes: 4 additions & 0 deletions home/.local/bin/aws_start
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

aws ec2 start-instances --instance-ids \
$(aws ec2 describe-instances --filters "Name=tag:Name,Values=$1" --output text --query "Reservations[*].Instances[*].InstanceId")

0 comments on commit 2df5f39

Please sign in to comment.