Skip to content

Instantly share code, notes, and snippets.

@hfs
Created February 23, 2014 20:35
Show Gist options
  • Save hfs/9176883 to your computer and use it in GitHub Desktop.
Save hfs/9176883 to your computer and use it in GitHub Desktop.
Script to wrap one bulletin in a minimal WMO message structure
#!/usr/bin/perl -wp
#
# Script to wrap one bulletin in a minimal WMO message structure
#
# Usage:
# bulletinize-file infile > outfile
# or
# bulletinize-file < infile > outfile
BEGIN {
print "\x01\x0D\x0D\n";
}
s/\x0D?\n/\x0D\x0D\n/;
END {
print "\x0D\x0D\n\x03";
}
@engshara
Copy link

engshara commented Aug 21, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment