• Life

    Life is so short (thought after watching Top Gun 2).

    The original Top Gun released in 1986 when I was 6. The second sequel Top Gun maverick released in 2021 when I was 41. It was 35 years! Another 35 years I will be 76 year old. Tom Cruise was born in 1962 and he will be 95 yeah old if we have the third sequel with the same cadency.. It just makes me feel so unreal that life is just so short

  • Linux,  工具,  技术

    Mac command line cheat sheet

    Behavior Command Comment go to the beginning of the line ctrl+a go to the end of the line ctrl+e Save a output of a command to a env variable principle_arn=$(aws –profile perAdmin sts get-caller-identity –query Arn –output text) use a env variable ${principle_arn} replace character sed -e “s|PRINCIPAL_ARN|${principle_arn}|g” \assume-role-policy-template.json > assume-role-policy.json The delimiter of choice is a forward slash (/), which is the most commonly used delimiter. However, sed can use any character as a delimiter. In fact, it will automatically use the character following the s as a delimiter-e means you can use the followed scripts multiple times.https://unix.stackexchange.com/questions/33157/what-is-the-purpose-of-e-in-sed-command