Skip to content

Instantly share code, notes, and snippets.

@reikind
reikind / gist:4607180
Created January 23, 2013 14:48
command that show Ubuntu version
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
@reikind
reikind / show_log.sh
Created January 17, 2013 13:51
exsample for show batch log message.
#!/bin/bash
usage() {
cat << EOT
usage $0 [OPTIONS]
OPTIONS
-h show this usage
@reikind
reikind / say_hello.py
Created November 25, 2012 09:46
exsample Python OptionParser
#!/usr/bin/python
# -*- coding:utf-8 -*-
from optparse import OptionParser
__version__ = '0.0.1'
def main():
usage = u'%prog'
parser = OptionParser(usage = usage, version = __version__)
parser.add_option('-g', '--git',
action = 'store_true',
@reikind
reikind / gist:4072830
Created November 14, 2012 15:39
Example bash getopts
#!/bin/bash
usage() {
cat << EOT
usage $0 [-hgw]
$0 -m MESSAGE
OPTIONS