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/bash | |
function display_usage () { | |
while [ $# -gt 0 ] | |
do | |
echo "Error: $1" | |
shift | |
done | |
echo "usage: $(basename $0) <path> [paths]" | |
exit 1 |
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/bash | |
SCRIPT_NAME=$(basename "$0") | |
EMACS_BIN=$(echo "${SCRIPT_NAME}" | perl -pe 's!^([-_\w]+?)\-src-files$!$1!;') | |
DEFAULT_FILE_TYPES=c,h,cpp,hh,cs,ac,am,java,js,pl,py,pm,sh,xml,php,css,lisp,rst,go | |
SET_FILE_TYPES= | |
ADD_FILE_TYPES= | |
DEL_FILE_TYPES= | |
TARGET_PATHS= |
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/bash | |
if [ $# -eq 0 \ | |
-o "$1" == "-h" \ | |
-o "$1" == "--help" \ | |
] | |
then | |
echo "usage: $(basename $0) [-h|--help] URI [URI [...]]" | |
exit 1 | |
fi |
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/bash | |
[ "$USER" == "debian-tor" ] || /usr/bin/sudo -u "debian-tor" "$0" "$@" | |
exec /usr/bin/arm "$@" |
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 perl | |
use strict; | |
use warnings; | |
use URI::Escape; | |
unless (@ARGV && ! grep {m/^(\-h|\-\-help)$/} @ARGV) { | |
print "usage: uri_unescape <uri-encoded-string>\n"; | |
print "usage: cat file | uri_unescape -\n"; | |
exit 1; | |
} |
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 perl | |
use strict; | |
use warnings; | |
unless (@ARGV >= 2) { | |
print "usage: reverse-taxes <tax> <total>\n"; | |
exit 1; | |
} |
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 perl | |
use strict; | |
use warnings; | |
our @arguments = (); | |
foreach my $arg (@ARGV) { | |
if ($arg =~ m!^\-(/.+?)$!) { | |
push(@arguments,$1); | |
} else { | |
push(@arguments,$arg); | |
} |
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 python | |
import os, sys, time | |
# | |
# == Summary == | |
# Proving that the following statement is best practice for determining if | |
# this python program is being run from a terminal or if it is daemonized. | |
# |
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/bash | |
: "${LENGTH:=79}" | |
usage() { | |
while [ $# -gt 0 ]; do echo "$1"; shift; done | |
echo "usage: $(basename $0) [options]" | |
echo "options:" | |
echo " -h This usage information screen" | |
echo " -l Truncate to given length (default: 79)" |
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/bash | |
usage() { | |
while [ $# -gt 0 ]; do echo "$1"; shift; done | |
echo "usage: $(basename $0) [options] [path ...]" | |
echo "options:" | |
echo " -h This usage information screen" | |
echo " -n Dry run, just print command" | |
echo " -t Explicit source file extn" | |
echo |