From 6241450e421fbcd0c39a8b2c15ad40c854d0a5ca Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 16 Sep 2013 17:16:10 +0900 Subject: [PATCH] add func dtscr, not works --- bashrc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bashrc b/bashrc index 80cc1eb..d334356 100755 --- a/bashrc +++ b/bashrc @@ -549,6 +549,28 @@ scr(){ __MY_SCRIPT=${_file} script ${_file} "$@" } +dtscr(){ + # dtscr + if test -z "$1" + then + echo "dtscr: usage: dtscr " + return 1 + fi + + local _cmdstr="`echo $@ | tr ' ' +`" + local _tformat="%Y%m%d-%H%M%S%z" + local _name="${pf}`date +${_tformat}`-${_cmdstr}" + + local _scr_file="${HOME}/${_name}.script" + + local _dt_dir="${TMP}/dtscr" + install -d "$_dt_dir" + + dtach -n "${_dt_dir}/${_name}" script "${_scr_file_}" "$@" + # echo $_name + # echo $_file +} + mcrypt-stream(){ test $# -eq 2 || return 1 case $1 in