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
#!/usr/bin/awk -f | |
BEGIN { TOTAL=0 } | |
{ TOTAL = TOTAL + $1 } | |
END { print TOTAL/NR } |
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
#!/usr/bin/env tclsh | |
##################################################### | |
# Usage: tclsh print_variant.tcl <variant_directory> | |
# OR: hcitcl print_variant.tcl <variant_directory> | |
##################################################### | |
proc print_variant {variant_dir} { | |
puts "################################################################################" | |
puts " Variant: $variant_dir" |
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
# Use this TPS proc to save each message to its own, unique file. | |
# | |
# To use this proc: | |
# - set the outbound thread's protocol to 'fileset-local' | |
# - set the outbound directory to the desired directory | |
# - set the outbound file to the prefix of the files that the messages will be placed in | |
# | |
# Output filename format: <DIRECTORY>/<FILE>.<DATE>-<COUNTER> | |
# where: | |
# DIRECTORY is the fileset-local outbound "Directory" setting |
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
# Usage: | |
# hcitcl error_msgs.tcl | |
msiAttach | |
# get a list of threads | |
set threads [msiTocEntry] | |
set len [llength $threads] | |
# loop through each thread |
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
if { ![info exists ::__times] } { | |
proc __time_start {name} { | |
lappend ::__times(${name}::start) [clock clicks] | |
} | |
proc __time_end {name} { | |
set queue $::__times(${name}::start) | |
set start [lindex $queue end] | |
set queue [lrange $queue 0 end-1] | |
set ::__times(${name}::start) $queue |
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
# This Cloverleaf TPS script removes all OBX segments prior to the first one that contains "ADDENDUM". | |
# This script also renumbers the OBX segments. | |
# | |
# See http://clovertech.healthvision.com/viewtopic.php?t=5953 | |
proc remove_prior_to_addendum {args} { | |
# set the procedure name | |
# This is used for error messages | |
set procname [lindex [info level [info level]] 0] | |
# bring some common variables into the scope of this proc |
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
#!/bin/ksh | |
# Examples: | |
# tail -f some.log | ts | |
# ping -i 5 someserver | ts | |
while read LINE | |
do | |
echo "$(date $@): $LINE" | |
done |
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
#!/usr/bin/sed -n -f | |
# Usage: sed -n -f <THISFILE> <IMP_LOG_FILE> | |
# run these commands for any line that starts with a space | |
/^ /{ | |
# replace the leading space | |
s/^ // | |
# define a label |
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
#!/usr/bin/env hcitcl | |
msiAttach | |
# get a list of threads | |
set threads [msiTocEntry] | |
set num_threads [llength $threads] | |
set total_pending 0 |
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
# Example message | |
set msg {MSH|^~\&|APP..... | |
NTE|1||TEMP: Room Temperature | |
NTE|2||SOURCE: Hand | |
NTE|3||NOTES: First | |
NTE|4||SPECIMEN SITE: Thumb | |
NTE|5||TEMP: Room Temperature | |
NTE|6||SOURCE: Hand | |
NTE|7||NOTES: Second | |
NTE|8||SPECIMEN SITE: dorsal hand |