code
stringlengths
1
1.96M
language
stringclasses
1 value
#!/bin/bash while read line do src=`echo $line |awk '{print $1}'` dst=`echo $line |awk '{print $2}'` echo -e "src: "$src"\t\tdst: "$dst sed -i "s/$src/$dst/g" core.dct bi.dct done < mirror.lst
Shell
#!/bin/bash UNIDCT='uni.dct' BIDCT='bi.dct' uni='uni.src' bi='bi.src' if [ ! -f $uni ];then echo $uni not exit exit 2 fi if [ ! -f $bi ];then echo $bi not exit exit 3 fi while read line do flag=`echo $line|grep '@'` if [ -z $flag ];then echo -e $line"\tus\t"0 >> $UNIDCT else echo -e $line"\tus\t"1 >> $BID...
Shell
#!/bin/bash DST_PATH=~/workspace/hiseg/data/dst DATA_PATH=~/workspace/hiseg/data SRC_PATH=~/workspace/hiseg/data/src DST_PATH=~/workspace/hiseg/data/dst DICT_PATH=~/workspace/hiseg/dict/hidict.dat EXE=~/workspace/hiseg/test/machine if [ $# -ne 1 ];then echo "USAGE: $0 <thread num>" exit 1 fi if [ $1 -gt 32 ];then ...
Shell
#!/bin/bash DST_PATH=~/workspace/hiseg/data/dst echo '------------------'`date +"%Y-%m-%d %H:%M:%S"`'------------------' threads=`ls $DST_PATH` for thread in $threads do files=`ls $DST_PATH/$thread |sort -n` files=`echo $files|sort -r|awk '{$1="";print }'` cd $DST_PATH/$thread echo "cd $DST_PATH/$thread" rm $fil...
Shell
#!/bin/bash DST_PATH=~/workspace/hiseg/data/dst DATA_PATH=~/workspace/hiseg/data SRC_PATH=~/workspace/hiseg/data/src DST_PATH=~/workspace/hiseg/data/dst DICT_PATH=~/workspace/hiseg/dict/hidict.dat EXE=~/workspace/hiseg/test/machine if [ $# -ne 1 ];then echo "USAGE: $0 <thread num>" exit 1 fi if [ $1 -gt 32 ];then ...
Shell
#!/bin/bash ICTCLAS=~/workspace/source/ictclas/ictclas MMSEG=/usr/local/bin/mmseg MMSEG_DICT_PATH=~/workspace/source/mmseg-0.7.3/data SCWS=~/workspace/source/scws-1.0.4/cli/scws SCWS_DICT=~/workspace/source/scws-1.0.4/etc/dict.utf8.xdb SCWS_RULE=~/workspace/source/scws-1.0.4/etc/rules.utf8.ini HISEG=~/workspace/hiseg/...
Shell
#!/bin/bash files=`ls data/` for f in $files do echo $f # iconv -f gb18030 -t utf8 "data/$f" > "src/$f" perl -pi -e's/\<[^\<]+\>|\s//g' "src/$f" done
Shell
#!/bin/bash files=`ls data/` for f in $files do echo $f # iconv -f gb18030 -t utf8 "data/$f" > "src/$f" perl -pi -e's/\<[^\<]+\>|\s//g' "src/$f" done
Shell
#!/bin/bash ICTCLAS=~/workspace/source/ictclas/ictclas MMSEG=/usr/local/bin/mmseg MMSEG_DICT_PATH=~/workspace/source/mmseg-0.7.3/data SCWS=~/workspace/source/scws-1.0.4/cli/scws SCWS_DICT=~/workspace/source/scws-1.0.4/etc/dict.utf8.xdb SCWS_RULE=~/workspace/source/scws-1.0.4/etc/rules.utf8.ini HISEG=~/workspace/hiseg/...
Shell
#!/bin/bash DST_PATH=~/workspace/hiseg/data/dst echo '------------------'`date +"%Y-%m-%d %H:%M:%S"`'------------------' threads=`ls $DST_PATH` for thread in $threads do files=`ls $DST_PATH/$thread |sort -n` files=`echo $files|sort -r|awk '{$1="";print }'` cd $DST_PATH/$thread echo "cd $DST_PATH/$thread" rm $fil...
Shell
#!/bin/bash file=je.utf8 for i in 1 2 3 4 5 6 7 8 9 10 11 12 do ./listbylen.sh -f $file -l $i > j$i.utf8 done ./listbylen.sh -f $file -l 12 -c '>' >jm.utf8
Shell
#!/bin/bash if [ $# -eq 0 ];then echo "usage:$0 -f <filepath> -l <wordlen> [-c <cmp:==|>|<>]"   exit 1 fi file='' wl=0 cmp='==' until [ $# -eq 0 ]; do if [ $1 == '-f' ];then shift file=$1 fi if [ $1 == '-l' ];then shift wl=$1 fi if [ $1 == '-c' ];then shift cmp=$1 fi shift done if [ ! -f $file ];...
Shell
#!/bin/bash nowt=`date +"%Y%m%d%H%M%S"` BASE_PATH=final FINAL=final.utf8 cd $BASE_PATH cat h1 hd2 hd3 hd4 jd2 jd3 i2 i3 i4 user > $FINAL cd .. ./setup_oov.py LC_ALL=C sort $BASE_PATH/$FINAL> hidict.utf8 rm $BASE_PATH/$FINAL
Shell
#!/bin/bash file=je.utf8 for i in 1 2 3 4 5 6 7 8 9 10 11 12 do ./listbylen.sh -f $file -l $i > j$i.utf8 done ./listbylen.sh -f $file -l 12 -c '>' >jm.utf8
Shell
#!/bin/bash DICT_PATH=~/workspace/hiseg/dict/final USER_DICT=user addword() { if [ -z $1 ];then echo "USAGE: $0 word [freq]" return 1 fi word=$1 freq=$2 if [ -z $2 ];then freq=1 fi echo "$freq" | grep -qv "[^0-9.]" if [ $? -eq 1 ];then echo "freq not a num" return fi res=$(grep "\b$word\b" $DICT_P...
Shell
#!/bin/bash DICT_PATH=~/workspace/hiseg/dict/final USER_DICT=user addword() { if [ -z $1 ];then echo "USAGE: $0 word [freq]" return 1 fi word=$1 freq=$2 if [ -z $2 ];then freq=1 fi echo "$freq" | grep -qv "[^0-9.]" if [ $? -eq 1 ];then echo "freq not a num" return fi res=$(grep "\b$word\b" $DICT_P...
Shell
#!/bin/bash if [ $# -eq 0 ];then echo "usage:$0 -f <filepath> -l <wordlen> [-c <cmp:==|>|<>]"   exit 1 fi file='' wl=0 cmp='==' until [ $# -eq 0 ]; do if [ $1 == '-f' ];then shift file=$1 fi if [ $1 == '-l' ];then shift wl=$1 fi if [ $1 == '-c' ];then shift cmp=$1 fi shift done if [ ! -f $file ];...
Shell
#!/bin/bash nowt=`date +"%Y%m%d%H%M%S"` BASE_PATH=final FINAL=final.utf8 cd $BASE_PATH cat h1 hd2 hd3 hd4 jd2 jd3 i2 i3 i4 user > $FINAL cd .. ./setup_oov.py LC_ALL=C sort $BASE_PATH/$FINAL> hidict.utf8 rm $BASE_PATH/$FINAL
Shell
#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; eit...
Shell
#! /bin/sh # # skeleton example file to build /etc/init.d/ scripts. # This file should be used to construct scripts for /etc/init.d. # # Written by Miquel van Smoorenburg <miquels@cistron.nl>. # Modified for Debian # by Ian Murdock <imurdock@gnu.ai.mit.edu>. # # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cis...
Shell
#! /bin/sh # # skeleton example file to build /etc/init.d/ scripts. # This file should be used to construct scripts for /etc/init.d. # # Written by Miquel van Smoorenburg <miquels@cistron.nl>. # Modified for Debian # by Ian Murdock <imurdock@gnu.ai.mit.edu>. # # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cis...
Shell
#!/bin/sh # # install - install a program, script, or datafile # # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, t...
Shell
#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help...
Shell
#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. # Copyright 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
Shell
#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; eit...
Shell
#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of th...
Shell
#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file sug...
Shell
#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU Gene...
Shell
#!/bin/sh # # install - install a program, script, or datafile # # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, t...
Shell
#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of th...
Shell
#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help...
Shell
#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. # Copyright 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
Shell
#! /bin/sh #---------------------------------------------------------------- # Startup script for the server of Tokyo Tyrant #---------------------------------------------------------------- # configuration variables prog="ttservctl" cmd="ttserver" basedir="/opt/ttdata" port="11311" pidfile="$basedir/meta.pid" logfi...
Shell
#! /bin/sh #---------------------------------------------------------------- # Startup script for the server of Tokyo Tyrant #---------------------------------------------------------------- # configuration variables prog="ttservctl" cmd="ttserver" basedir="/opt/ttdata" port="11312" pidfile="$basedir/data.pid" logfi...
Shell
#! /bin/sh #---------------------------------------------------------------- # Startup script for the server of Tokyo Tyrant #---------------------------------------------------------------- # configuration variables prog="ttservctl" cmd="ttserver" basedir="/opt/ttdata" port="11312" pidfile="$basedir/data.pid" logfi...
Shell
#! /bin/sh #---------------------------------------------------------------- # Startup script for the server of Tokyo Tyrant #---------------------------------------------------------------- # configuration variables prog="ttservctl" cmd="ttserver" basedir="/opt/ttdata" port="11311" pidfile="$basedir/meta.pid" logfi...
Shell
#!/bin/bash PIDPATH='/tmp' cmd='top -H -d1' for pidfile in $PIDPATH/*.pid do pid=$(cat $pidfile) cmd="$cmd -p $pid" done $cmd
Shell
#!/bin/bash PIDPATH='/tmp' cmd='top -H -d1' for pidfile in $PIDPATH/*.pid do pid=$(cat $pidfile) cmd="$cmd -p $pid" done $cmd
Shell
#!/bin/bash PIDPATH='/tmp' if [ $# -eq 1 ];then cmd="kill $1" else cmd="kill -SIGKILL" fi for pidfile in $PIDPATH/*.pid do pid=$(cat $pidfile) cmd="$cmd $pid" done $cmd
Shell
#!/bin/bash PIDPATH='/tmp' if [ $# -eq 1 ];then cmd="kill $1" else cmd="kill -SIGKILL" fi for pidfile in $PIDPATH/*.pid do pid=$(cat $pidfile) cmd="$cmd $pid" done $cmd
Shell
#! /bin/sh # libtoolT - Provide generalized library-building support services. # Generated automatically by (GNU ) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originall...
Shell
# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # # Th...
Shell
#! /bin/sh # # Created by configure './configure' \ "$@"
Shell
#! /bin/sh # libtoolT - Provide generalized library-building support services. # Generated automatically by (GNU ) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originall...
Shell
#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # This file is (in principle) common to ALL GNU software. # The presence of a machine in thi...
Shell
#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of th...
Shell
#! /bin/sh # # Created by configure './configure' \ "$@"
Shell
#!/bin/bash # Sample shell script for invoking ant. # Copy to a new file and fill in the values below. # To keep the secrets secret, don't share your runant script. # 01234567890123456789 ant -Dsecret=<a random secret string, 20 chars long> \ -Dapp-id=your-app-id \ -Dapp-version=1 \ -Doauth-cli...
Shell
#!/bin/bash # Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
Shell
#!/bin/bash # Copyright (C) 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
Shell
#!/bin/bash curl -O https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz curl -O http://leptonica.googlecode.com/files/leptonica-1.69.tar.gz tar -zxvf tesseract-ocr-3.02.02.tar.gz tar -zxvf leptonica-1.69.tar.gz rm -f tesseract-ocr-3.02.02.tar.gz rm -f leptonica-1.69.tar.gz mv tesseract-ocr jni/com_g...
Shell
#!/bin/bash curl -O http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz tar -zxvf tesseract-ocr-3.02.eng.tar.gz rm -f tesseract-ocr-3.02.eng.tar.gz mkdir data mv tesseract-ocr data/tesseract adb push data/ /sdcard/ adb shell sync
Shell
#!/bin/sh cd .. rm -rf Cartographer_Battlegrounds rm -rf Cartographer_Coordinates rm -rf Cartographer_Foglight rm -rf Cartographer_GroupColors rm -rf Cartographer_GuildPositions rm -rf Cartographer_InstanceLoot rm -rf Cartographer_InstanceMaps rm -rf Cartographer_InstanceNotes rm -rf Cartographer_LookNFeel rm -rf Carto...
Shell
#!/bin/sh cd .. rm -rf Cartographer_Battlegrounds rm -rf Cartographer_Coordinates rm -rf Cartographer_Foglight rm -rf Cartographer_GroupColors rm -rf Cartographer_GuildPositions rm -rf Cartographer_InstanceLoot rm -rf Cartographer_InstanceMaps rm -rf Cartographer_InstanceNotes rm -rf Cartographer_LookNFeel rm -rf Carto...
Shell
#/bin/bash cd .. rm -rf BigWigs_SC rm -rf BigWigs_Karazhan rm -rf BigWigs_Outland rm -rf BigWigs_Extras rm -rf BigWigs_Plugins rm -rf BigWigs_TheEye rm -rf BigWigs_BlackTemple rm -rf BigWigs_Hyjal rm -rf BigWigs_ZulAman rm -rf BigWigs_Sunwell cd BigWigs mv Karazhan ../BigWigs_Karazhan mv SC ../BigWigs_SC mv Outland ...
Shell
#!/bin/sh # configure script for zlib. # # Normally configure builds both a static and a shared library. # If you want to build just a static library, use: ./configure --static # # To impose specific compiler or flags or install directory, use for example: # prefix=$HOME CC=cc CFLAGS="-O4" ./configure # or for csh/t...
Shell
#!/bin/sh prefix="@prefix@" exec_prefix="@exec_prefix@" exec_prefix_set=no usage="\ Usage: libmpq-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]" if test "$#" -eq "0"; then echo "${usage}" 1>&2 exit 1 fi while test "$#" -gt "0"; do case "$1" in -*=*) optarg=`echo "$1" ...
Shell
#!/bin/sh prefix="@prefix@" exec_prefix="@exec_prefix@" exec_prefix_set=no usage="\ Usage: libmpq-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]" if test "$#" -eq "0"; then echo "${usage}" 1>&2 exit 1 fi while test "$#" -gt "0"; do case "$1" in -*=*) optarg=`echo "$1" ...
Shell
#!/bin/sh # echo "Generating build information using aclocal, autoheader, automake and autoconf" echo "This may take a while ..." # Touch the timestamps on all the files since CVS messes them up directory=`dirname $0` touch $directory/configure.ac # Regenerate configuration files libtoolize --copy aclocal autoheader ...
Shell
#!/bin/sh # echo "Generating build information using aclocal, autoheader, automake and autoconf" echo "This may take a while ..." # Touch the timestamps on all the files since CVS messes them up directory=`dirname $0` touch $directory/configure.ac # Regenerate configuration files libtoolize --copy aclocal autoheader ...
Shell
#!/bin/sh # Bzgrep wrapped for bzip2, # adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. ## zgrep notice: ## zgrep -- a wrapper around a grep program that decompresses files as needed ## Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca> PATH="/usr/bin:$PATH"; export PA...
Shell
#!/bin/sh # Bzmore wrapped for bzip2, # adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. PATH="/usr/bin:$PATH"; export PATH prog=`echo $0 | sed 's|.*/||'` case "$prog" in *less) more=less ;; *) more=more ;; esac if test "`echo -n a`" = "-n a"; then # looks like a SysV system: ...
Shell
#!/bin/sh # sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh # Bzcmp/diff wrapped for bzip2, # adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. # Bzcmp and bzdiff are used to invoke the cmp or the diff pro- # gram on compressed files. All options specified are passed #...
Shell
#!/bin/bash # see the README file for usage etc. # # ------------------------------------------------------------------ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # # bzip2/libbzip2 version 1.0.5 of 10 December 2007 # Copyright (C) 1996-2007 Julian S...
Shell
#!/bin/sh # Bzgrep wrapped for bzip2, # adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. ## zgrep notice: ## zgrep -- a wrapper around a grep program that decompresses files as needed ## Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca> PATH="/usr/bin:$PATH"; export PA...
Shell
#!/bin/sh # sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh # Bzcmp/diff wrapped for bzip2, # adapted from zdiff by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. # Bzcmp and bzdiff are used to invoke the cmp or the diff pro- # gram on compressed files. All options specified are passed #...
Shell
#!/bin/bash # see the README file for usage etc. # # ------------------------------------------------------------------ # This file is part of bzip2/libbzip2, a program and library for # lossless, block-sorting data compression. # # bzip2/libbzip2 version 1.0.5 of 10 December 2007 # Copyright (C) 1996-2007 Julian S...
Shell
#!/bin/sh # Bzmore wrapped for bzip2, # adapted from zmore by Philippe Troin <phil@fifi.org> for Debian GNU/Linux. PATH="/usr/bin:$PATH"; export PATH prog=`echo $0 | sed 's|.*/||'` case "$prog" in *less) more=less ;; *) more=more ;; esac if test "`echo -n a`" = "-n a"; then # looks like a SysV system: ...
Shell
#!/bin/bash ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this scr...
Shell
#! /bin/sh : 'This file is in the public domain, so clarified as of' : '2006-07-17 by Arthur David Olson.' case $#-$1 in 2-|2-0*|2-*[!0-9]*) echo "$0: wild year - $1" >&2 exit 1 ;; esac case $#-$2 in 2-even) case $1 in *[24680]) exit 0 ;; *) exit 1 ;; esac ;; 2-nonpres|2-nonuspres) case $1 in...
Shell
#! /bin/sh : 'This file is in the public domain, so clarified as of' : '2006-07-17 by Arthur David Olson.' case $#-$1 in 2-|2-0*|2-*[!0-9]*) echo "$0: wild year - $1" >&2 exit 1 ;; esac case $#-$2 in 2-even) case $1 in *[24680]) exit 0 ;; *) exit 1 ;; esac ;; 2-nonpres|2-nonuspres) case $1 in...
Shell
#!/usr/bin/ksh data_do=$(date +'%d') if [[ $data_do -eq 24 ]] then exit 0; else echo '------------do------------' >> /script/backup_lev1_init_out.txt fi date >> /script/backup_lev1_init_out.txt echo 'start rman lev1_cumulative '>> /script/backup_lev1_init_out.txt mkdir -p /backup/trff/arc...
Shell
#!/usr/bin/ksh date >> /script/backup_full_init_out.txt echo 'start rman backup_full '>> /script/backup_full_init_out.txt x1oooo=$(date +"%y_%m_%d") sed 's/x1oooo/'$x1oooo'/g' /script/backup_full_rman.tpl >/script/backup_full.rman #rman backup export LANG=en_US export NLS_LANG="simplified ch...
Shell
#!/usr/bin/ksh data_do=$(date +'%d') date >> /script/backup_arch_init_out.txt echo 'start rman backup arch '>> /script/backup_arch_init_out.txt x1oooo=$(date +"%y_%m_%d") sed 's/x1oooo/'$x1oooo'/g' /script/backup_arch.rtpl >/script/backup_arch.rman #rman backup export LANG=en_US ex...
Shell
#!/usr/bin/ksh #-------date do data_do=$(date +'%d') date >> /script/backup_fulldb_init_out.txt echo 'start rman backup_fulldb '>> /script/backup_fulldb_init_out.txt x1oooo=$(date +"%y_%m_%d") sed 's/x1oooo/'$x1oooo'/g' /script/backup_full_arch.rtpl >/script/backup_full_arch....
Shell
#!/usr/bin/ksh data_do=$(date +'%d') date >> /script/backup_arch_init_out.txt echo 'start rman backup arch '>> /script/backup_arch_init_out.txt x1oooo=$(date +"%y_%m_%d") sed 's/x1oooo/'$x1oooo'/g' /script/backup_arch.rtpl >/script/backup_arch.rman #rman backup export LANG=en_US ex...
Shell
#!/usr/bin/ksh #-------date do data_do=$(date +'%d') date >> /script/backup_fulldb_init_out.txt echo 'start rman backup_fulldb '>> /script/backup_fulldb_init_out.txt x1oooo=$(date +"%y_%m_%d") sed 's/x1oooo/'$x1oooo'/g' /script/backup_full_arch.rtpl >/script/backup_full_arch....
Shell
#!/usr/bin/ksh date >> /script/backup_full_init_out.txt echo 'start rman backup_full '>> /script/backup_full_init_out.txt x1oooo=$(date +"%y_%m_%d") sed 's/x1oooo/'$x1oooo'/g' /script/backup_full_rman.tpl >/script/backup_full.rman #rman backup export LANG=en_US export NLS_LANG="simplified ch...
Shell
#!/usr/bin/ksh LOG_FILE=${0}.out echo '---------------------' > $LOG_FILE CMD_STR=" #export LANG=en_US #export NLS_LANG="simplified chinese_china".zhs16gbk #export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' #export ORACLE_BASE=/ora10g #export ORACLE_HOME=$ORACLE_BASE/db #export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr...
Shell
#!/usr/bin/ksh data_do=$(date +'%d') if [[ $data_do -eq 24 ]] then exit 0; else echo '------------do------------' >> /script/backup_lev1_init_out.txt fi date >> /script/backup_lev1_init_out.txt echo 'start rman lev1_cumulative '>> /script/backup_lev1_init_out.txt mkdir -p /backup/trff/arc...
Shell
#!/usr/bin/ksh LOG_FILE=${0}.out echo '---------------------' > $LOG_FILE CMD_STR=" #export LANG=en_US #export NLS_LANG="simplified chinese_china".zhs16gbk #export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss' #export ORACLE_BASE=/ora10g #export ORACLE_HOME=$ORACLE_BASE/db #export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr...
Shell
#!/bin/sh # bash exp_by_user.sh ######################### 只产生脚本不执行 !!!!! ########## #通过文件读取用户 ++ #导一个用户,写用户名到文件,比较两个文件 ++ # 通过 cyg win 做脚本测试 # bash -n //做语法检查 # 导出,上传,删除,日志 # 最好是 导出用户名=存放文件夹=上传后删除文件夹内的文件+并且文件夹改名为+_upok # ftp服务器与本的结构一样, # 最后比对文件个数,和大小 # 建立3个模块 导出模块,上传模块,删除模块 # 校验模块 # 保存每次 执...
Shell
#!/bin/sh # bash exp_by_user.sh ######################### 只产生脚本不执行 !!!!! ########## #通过文件读取用户 ++ #导一个用户,写用户名到文件,比较两个文件 ++ # 通过 cyg win 做脚本测试 # bash -n //做语法检查 # 导出,上传,删除,日志 # 最好是 导出用户名=存放文件夹=上传后删除文件夹内的文件+并且文件夹改名为+_upok # ftp服务器与本的结构一样, # 最后比对文件个数,和大小 # 建立3个模块 导出模块,上传模块,删除模块 # 校验模块 # 保存每次 执...
Shell
#!/bin/bash # cygwin 运行方式 # cygwin 运行方式 cyg_home=/cygdrive/d/cygwin PATH=$cyg_home/usr/sbin:$cyg_home/bin:$PATH echo '#################################################' echo '# #' echo '# #' echo '# ...
Shell
#!/bin/bash #文件时间测试 #下 建立一堆时间不同的文件 #通过 选好 建立文件名 等于时间的文件 let all_time=1*60+(24+1) let time_line=$all_time/2 * -1 file_name='' file_date='' for loopv in $all_time do file_date=$( date +'%Y%%m%d%H%M00' -d ${time_line}min ); file_name=$file_date.file; touch -t $file_date $file_name; ...
Shell
#!/bin/bash #--fun get_pwd(){ osv='/' nf_v=$(echo $0 | awk -F $osv '{print NF}') pwd=$(echo $0 | awk -F $osv '{print $1}')${osv} n_v=2 while [ "$n_v" -ne "$nf_v" ] do temp_v=$(echo $0 | awk -F $osv '{print $('$n_v')}') pwd="${pwd}${temp_v}/" let n_v++ done } #---main get_pwd cd "$pwd" pwd xgettext -d em ...
Shell
#!/bin/bash #--fun get_pwd(){ osv='/' nf_v=$(echo $0 | awk -F $osv '{print NF}') pwd=$(echo $0 | awk -F $osv '{print $1}')${osv} n_v=2 while [ "$n_v" -ne "$nf_v" ] do temp_v=$(echo $0 | awk -F $osv '{print $('$n_v')}') pwd="${pwd}${temp_v}/" let n_v++ done } #---main get_pwd cd "$pwd" pwd xgettext -d em ...
Shell
#!/bin/bash #################################### # mysql db recover #MDB # 备份数据保存7天 #################################### #---------------------------参数 mdb_backup_file=/opt/backup/0401,backu_5_ #恢复的文件 /opt/backup/0401,backu_5_ mdb_database_user='root' mdb_database_pass='wscdq815' mdb_database_host='...
Shell
#!/bin/bash #################################### # mysql db recover #MDB # 备份数据保存7天 #################################### #---------------------------参数 mdb_backup_file=/opt/backup/0401,backu_5_ #恢复的文件 /opt/backup/0401,backu_5_ mdb_database_user='root' mdb_database_pass='wscdq815' mdb_database_host='...
Shell
#!/bin/bash #################################### # mysql db backup #MDB # 备份数据保存7天 同时 上传ftp #################################### # cygwin 运行方式 cyg_home=/cygdrive/d/cygwin PATH=$cyg_home/usr/sbin:$cyg_home/bin:$PATH #备份路径 db_backup_dir='/cygdrive/d/AdventNet/ME/ServiceDesk/mysql/backup/' db_log_index...
Shell
#!/bin/bash #################################### # mysql tab backup #MDB # 备份单个表 ####################################
Shell
#!/bin/bash #################################### # mysql tab backup #MDB # 备份单个表 ####################################
Shell
#!/bin/bash #################################### # mysql db backup #MDB # 备份数据保存7天 同时 上传ftp #################################### # cygwin 运行方式 cyg_home=/cygdrive/d/cygwin PATH=$cyg_home/usr/sbin:$cyg_home/bin:$PATH #备份路径 db_backup_dir='/cygdrive/d/AdventNet/ME/ServiceDesk/mysql/backup/' db_log_index...
Shell
#!/bin/bash ########################## #日志分割 #不能重复执行,不然会替换掉原来的文件 ########################## nginx_conf_path='/etc/nginx/sites-enabled/' ########### fun ############ #----get log list #按照配置移动文件, move_log(){ loop='' for loop in $log_line do log_new_name=$(sed...
Shell
#!/bin/bash ########################## #日志分割 #不能重复执行,不然会替换掉原来的文件 ########################## nginx_conf_path='/etc/nginx/sites-enabled/' ########### fun ############ #----get log list #按照配置移动文件, move_log(){ loop='' for loop in $log_line do log_new_name=$(sed...
Shell
#!/bin/bash ######################## #SVN 特殊 .svn 文件复制 ######################## ####### define ####### 目录以/结尾 src_pwd='' #svn 工作目录 work_pwd='/cygdrive/e/disk/jd_mem/' to_pwd='/cygdrive/w/' bin_path="/cygdrive/d/cygwin/bin/" #错误状态 glo_state=0 ####### fun ####### #产生 列表 get .svn list get_svn_list(){ #echo ${bi...
Shell
#!/bin/bash ######################## #SVN 特殊 .svn 文件复制 ######################## ####### define ####### 目录以/结尾 src_pwd='' #svn 工作目录 work_pwd='/cygdrive/e/disk/jd_mem/' to_pwd='/cygdrive/w/' bin_path="/cygdrive/d/cygwin/bin/" #错误状态 glo_state=0 ####### fun ####### #产生 列表 get .svn list get_svn_list(){ #echo ${bi...
Shell
#!/bin/bash #文件时间测试 #下 建立一堆时间不同的文件 #通过 选好 建立文件名 等于时间的文件 let all_time=1*60+(24+1) let time_line=$all_time/2 * -1 file_name='' file_date='' for loopv in $all_time do file_date=$( date +'%Y%%m%d%H%M00' -d ${time_line}min ); file_name=$file_date.file; touch -t $file_date $file_name; ...
Shell
#!/bin/bash lynx -mime_header -auth=woshiug:106821511 "http://www.3322.org/dyndns/update?system=dyndns&hostname=woshiug.3322.org" echo
Shell
#!/bin/bash intf=wlan0 intf=wlan1 echo $0 $1 $2 case $1 in set) wpa_passphrase $2 $3 > /etc/wpa_supplicant/wpa_supplicant.conf ;; up) cat /etc/wpa_supplicant/wpa_supplicant.conf wpa_supplicant -i $intf -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -B -P /tmp/wpa_supplican...
Shell