This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function awslogzf() { | |
| local PROFILE=`cat ~/.aws/credentials | egrep "\[" | sed "s/\[\(.*\)\]/\1/" | fzf `; | |
| local GROUP=`awslogs groups --profile $PROFILE | fzf `; | |
| local SELECTTIEM=`echo -e "realtime\npast" | fzf +m`; | |
| if [[ $SELECTTIEM == "realtime" ]]; then | |
| local TIMESPAN="-w" ; | |
| else | |
| local MINSAGO=$(for i in `seq 10 10 10080`; do echo $i "->" $(date -d -${i}min) ; done | fzf --prompt="10minutes from: "| tr "\t" " " | tr -s " " | cut -d " " -f1 | sort -n | sed -e 1b -e '$!d'); | |
| local FROM=`echo $MINSAGO | cut -d " " -f2 ` | |
| local TILL=`echo $MINSAGO | cut -d " " -f1 ` |