Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
if test $# -lt 2 ; then
echo "USAGE: $(basename $0) [input pdf] [output eps]"
exit 2
fi
input=$1
output=$2
@TakashiUNUMA
TakashiUNUMA / Makefile
Last active December 25, 2015 15:59
Makefile for compiling a LaTeX file by the use of XeLaTeX.
SHELL = /bin/sh
FILE0 = main
TEX = $(FILE0).tex
XDV = $(FILE0).xdv
PDF = $(FILE0).pdf
PDFOUT = $(FILE0)_final.pdf
FILE1 = handout
HTEX = $(FILE1).tex
HXDV = $(FILE1).xdv
@TakashiUNUMA
TakashiUNUMA / get_data_from_uwyo.edu.sh
Created July 13, 2013 08:38
A wget wrapper script for the sounding data of http://weather.uwyo.edu/ . This script requires ”change_time” shell script (https://gist.github.com/TakashiUNUMA/5821630). USAGE: get_data_from_uwyo.edu.sh [JSTTIME] [STATION NUMVER] [TYPE]
#!/bin/sh
#
# wget wrapper script
#
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013/07/13
#
debug_level=100
if test $# -lt 3 ; then
@TakashiUNUMA
TakashiUNUMA / change_time.sh
Last active December 18, 2015 17:49
Change Time by the use of date and awk command.
#!/bin/sh
#
# change_time.sh
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013/06/21
#
if test $# -lt 3 ; then
echo "USAGE: $(basename $0) [YYYYMMDDHHNN] [INT] [+/-]"
echo " *** Note: All values must be 'integer'. *** "
@TakashiUNUMA
TakashiUNUMA / gmtplot.sh
Created June 4, 2013 06:42
Template for GMT plotting.
#!/bin/sh
#
# GMTPLOT
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013:06/04
#
infile=Z__C_RJTD_composit_RDR_JMAGPV.out
# setting
@TakashiUNUMA
TakashiUNUMA / 10min_2_3hour.sh
Created May 22, 2013 10:05
Change from 10 minute interval time to 3 hour interval time.
#!/bin/sh
#
# program of converting from 10-min. time to 3-hour time
#
# original script coded by Takashi Unuma, Kyoto Univ.
# Last modified: 2013/05/22
#
if test ${#1} -lt 12 ; then
echo "please type following format of date:"
@TakashiUNUMA
TakashiUNUMA / r2z.sh
Created May 22, 2013 09:12
Calculate reflected intensity [dBZ] by the use of Z-R relationship.
#!/bin/sh
#
# Calculate reflected intensity [dBZ] by the use of Z-R relationship.
# original script coded by Takashi Unuma, Kyoto Univ.
#
# -----
# Z = A * R^b
# where, A = 200, b=1.6
#
@TakashiUNUMA
TakashiUNUMA / utc2jst.sh
Created April 26, 2013 10:45
日時処理プログラム。 12桁のUTC時刻を、12桁のJST時刻に変換する。
#!/bin/sh
#
# 日時処理
# Last update: 2012/01/12
#
# 引数があるかどうかチェック
if test $# -lt 1
then
echo "USAGE: utc2jst yyyymmddhhnn"
@TakashiUNUMA
TakashiUNUMA / jst2utc.sh
Created April 26, 2013 10:42
日時処理プログラム。 12桁のJST時刻を、12桁のUTC時刻に変換する。
#!/bin/sh
#
# 日時処理
# Last modified: 2012/04/16
#
# 引数があるかどうかチェック
if test $# -lt 1
then
echo "USAGE: jst2utc yyyymmddhhnn"
@TakashiUNUMA
TakashiUNUMA / cache_free.sh
Last active December 16, 2015 16:49
Chach を解放する、shell script。
#!/bin/sh
echo '# before ------------------------------------------------------------- #'
free
echo ''
echo 3 > /proc/sys/vm/drop_caches
echo '# after -------------------------------------------------------------- #'
free
echo ""