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
#!/usr/bin/env bash | |
print_help () { echo "Option -f \${file}: Set file"; exit 0; } | |
fail () { echo "Error: $*" >&2; exit 1; } | |
unset file | |
OPTIND=1 | |
while getopts :f:h-: option | |
do case $option in | |
h ) print_help;; |
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
#!/usr/bin/env bash | |
set -o nounset -o errexit | |
#HELP:COMMAND_NAME: put packages in their place | |
#HELP:Options: | |
command="$0" | |
#HELP: --help | -h: print this help |
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
# Save as "Copy Mail message URI to clipboard.scpt" in ~/Library/Scripts/Applications/Mail | |
tell application "Mail" | |
set theSelectedMessages to selection | |
set the selected_message to item 1 ¬ | |
of the theSelectedMessages | |
set message_id to the message id of the selected_message | |
end tell | |
set the clipboard to "message://%3c" & message_id & "%3e" |
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
BEGIN { | |
printf "<?xml version=\"1.0\" encoding=\"US-ASCII\" standalone=\"yes\"?>\n" | |
printf "<file xmlns=\"http://example.org/csv-to-xml\">\n" | |
FPAT = "[^,]*|(\"([^\"]|(\"\"))*\")" | |
RS = "\n" | |
} | |
{ | |
printf "<row>\n" | |
for (i = 1; i <= NF; i++) { |