Created
February 15, 2012 21:39
-
-
Save randysecrist/1839170 to your computer and use it in GitHub Desktop.
handy shell script commands
This file contains 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
# Passing a list of files to mHealth | |
for i in `find . -name "*.hl7"` | |
do | |
curl -X PUT -H "Content-Type: application/octet-stream" -i 'http://localhost:9292/v2/health/data/hl7?oauth_token=4b5f64eb-0679-4521-97be-a705fd2615c0' --data-binary @$i | |
done | |
# rename extension for files in current (and all sub) directories. | |
for i in `find . -name "*.txt"` | |
do | |
mv "$i" "${i%.txt}.hl7" | |
done | |
# monitor network packet loss | |
watch -d "sh -c 'netstat -s | egrep -i retrans'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment