Tags » Bash

Find AWS EC2 tags and delete them

Quick script to find all tags associated with an EC2 instance, and then delete them.

Requires awscli

for i in `aws ec2 describe-tags --resource=$INSTANCE_ID --query "Tags[].ResourceId"`
aws ec2 delete-tags --resources $i

HTH someone.


Linux Fu: Better Bash Scripting

It is easy to dismiss bash — the typical Linux shell program — as just a command prompt that allows scripting. Bash, however, is a full-blown programming language. 84 more words

Hackaday Columns

Insert Data to Mysql Table Using Bash Command Line

To insert data from bash command line you will need username and password to your MySQL database. Consider a following table called “fruits” with auto increment “id”: 35 more words


"basename" -- Tell Me The Last Bus Stop

Few commands exist in Linux (and other Unix-derivatives) for the sole reason of aiding scripting and writing one-liners. basename is one of the little-known commands in that pack (at least for me). 310 more words


GPG key adding script for Debian*

*Debian based systems

There might be an easier way. Or maybe there is even an automatic way to do it. I couldn’t be bothered to search long enough. 127 more words


A Powerline style prompt for your shell

For a hassle free powerline like shell. Works with bash and zsh.

* Shows some important details about the git/svn/hg/fossil branch (see below)
* Changes color if the last command exited with a failure code…

38 more words


Git status with powerline


1. pip install –user powerline-gitstatus

Follow the instructions in on site https://github.com/jaspernbrouwer/powerline-gitstatus
2. Add custom highlight groups.

vim .local/lib/python2.7/site-packages/powerline/config_files/colorschemes/default.json
… 358 more words