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/sh | |
FILE=~/.bash_myhistory | |
if [ "$1" = "-h" ]; then | |
echo 1>&2 "usage: noc [-h|-l] [<num>]" | |
echo 1>&2 " -h display this help and exit" | |
echo 1>&2 " -l display most recently used list" | |
echo 1>&2 " (range: 0~<num>: default num zero)" | |
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 ruby | |
# | |
# NATO phonetic alphabet | |
# | |
def usage | |
puts "Usage: " + File.basename($0) + " num1 [num2]" | |
puts "" | |
puts "num1 - This number expresses an opening in table." |
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 | |
PROGNAME=$(basename $0) | |
VERSION="1.0.0" | |
usage() { | |
echo "Usage: $PROGNAME [OPTIONS] [FILE]" | |
echo " This script is ~." | |
echo | |
echo "Options:" |
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/local/bin/gawk -f | |
BEGIN { | |
# Set delimiter as \034, avoid conflict with other characters | |
sort_exe = "sort -t \"\034\" -nr" | |
} | |
{ | |
# Pass to the child process | |
printf("%d\034%s\n", NR, $0) |& sort_exe; |
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; | |
my $fg = "\x1b[38;5;"; | |
my $bg = "\x1b[48;5;"; | |
my $rs = "\x1b[0m"; | |
my $color = 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
#!/usr/bin/ruby | |
require 'optparse' | |
require 'base64' | |
option_hash = {} | |
OptionParser.new{|opt| | |
opt.on('-e [VAL]') {|v| option_hash[:e] = v} | |
opt.on('-d VAL') {|v| option_hash[:d] = v} |
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/sh | |
ECHO="echo -e" | |
case `$ECHO` in | |
-e) | |
ECHO=echo;; | |
esac | |
print_bar() | |
{ |
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
# | |
# @(#) bookmarker.sh ver.1.4.0 2013.08.12 | |
# | |
# Copyright (c) 2013, b4b4r07 | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, are permitted provided | |
# that the following conditions are met: | |
# | |
# * Redistributions of source code must retain the above copyright notice, this list of conditions |
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
[ "$ZSH_VERSION" ] || return 1 | |
declare -r zshmarkdir=~/.zshmarkdir | |
declare -r zshmarklist=$zshmarkdir/zshmarklist | |
declare -r zshmarklog=$zshmarkdir/zshmarklog | |
declare -i exit_usage=0 | |
function _zshmark_show() { | |
[ ! -e $zshmarklist ] && { echo "$(basezzname $zshmarklist): No exist"; return 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 | |
declare test_log=~/.safe/log | |
OLDIFS=$IFS | |
IFS=$'\n' | |
array_front=( $(tail -n "${1:-10}" $trash_log | awk '{print $1,$2}' | sed "s $HOME ~ g") ) | |
array_center=( $(tail -n "${1:-10}" $trash_log | awk '{print $3}' | sed "s $HOME ~ g") ) | |
array_rear=( $(tail -n "${1:-10}" $trash_log | awk '{print $4}' | sed "s $HOME ~ g") ) |
OlderNewer