Skip to content

Instantly share code, notes, and snippets.

View achmadns's full-sized avatar

Achmad Nasirudin Sandi achmadns

View GitHub Profile
@achmadns
achmadns / print-param.sh
Created May 12, 2017 09:24
Print and Iterate Shell Script Parameters
#!/bin/bash
: '
Example
$ ./print-param.sh 4 2 3 4 5 6
4 2 3 4 5 6
4
2
3
4
5
@achmadns
achmadns / show-retention-policies.sh
Created October 9, 2017 03:43
Show retention policies on InfluxDB through CLI
#!/bin/bash
for x in `influx -execute 'show databases' | grep -v -e ^name -e --- -e ^_internal`;do printf "RETENTION POLICIES ON $x \n"; influx -execute "SHOW RETENTION POLICIES ON $x";done