Last active
December 17, 2015 06:58
-
-
Save mbrownnycnyc/5568745 to your computer and use it in GitHub Desktop.
a quick script that copies gzipped argus data files (produced with `rastream -S 127.0.0.1:561 -B 15s -M time 1h -w /var/opt/argus/%Y-%m-%d/argus_%T -f /usr/local/bin/rastream.sh` for instance [note the use of %Y-%m-%d]) to a working directory. This is to ease the targeting of queries.
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
#!/bin/bash | |
#arguswork script to copy and rename argus files to a working directory | |
#I've commented out the original script, which follows a different organizational structure. | |
# to limit times, I've opted to use the -t argument with any ra* clients instead of worrying about limiting time simply by argus data files read. | |
#mkdir -p ~/working/`basename $(pwd)` | |
#cp * ~/working/`basename $(pwd)` | |
#cd ~/working/`basename $(pwd)` | |
#gunzip * | |
export dateoffiles="$(basename $(pwd))_" | |
cp * ~/working/ | |
cd ~/working/ | |
for f in $(ls -m1 argus_*) ; do mv "$f" "$dateoffiles$f" ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment