码迷,mamicode.com
首页 >  
搜索关键字:script syntax    ( 25337个结果)
重复执行命令的脚本
工作过程中,为了监控状态,经常要不断地重复执行某个命令,因此写了个脚本来简化操作#!/bin/bash #filename:redo.sh #usage:redo.sh[-ddelaytime][-ccount]command #默认间隔时间为15s,无限循环执行 delay=15 count=-1 whilegetoptsd:c:OPTION do case$OPTIONin d)delay=$OPT..
分类:其他好文   时间:2014-10-06 04:18:19    阅读次数:242
拆分大文件的脚本
有时候需要把一个大文件拆分成几个小文件,由于生产系统上没有split程序,因此自己写了两个脚本来实现该功能。第一个脚本根据行数来拆分:#!/bin/bash #filenamemy-line-split.sh #usage:my-line-split.sh行数bigfile #拆分的文件以bigfile.split.1bigfile.split.2...命名 spli..
分类:其他好文   时间:2014-10-06 02:21:30    阅读次数:180
[Clojure] A Room-Escape game, playing with telnet and pure-text commands - Part 3
Code Path: https://github.com/bluesilence/Lisp/blob/master/clojure/projects/room-escape/src/room_escape/script.clj Extract Story to TXT In order to move the story from .clj into .txt, I lever...
分类:Web程序   时间:2014-10-05 17:36:38    阅读次数:214
scheme set-car! 模拟
#lang scheme ( define li '( 1 2 3 4 ) ) ( define-syntax set-car! ( syntax-rules () ( ( set-car! li elem ) ( set! li ( cons elem ( cdr li ) ) ) ) ) ) ( set-car! li '( a b ) ) #...
分类:其他好文   时间:2014-10-05 17:27:48    阅读次数:189
AWK使用解析
Cut命令的局限 df -h | cut -d “ ” -f 5 /etc/passwd  cut命令无法正确截取以空格为分隔符的内容AWK格式awk ‘条件1{动作1} 条件2{动作2}…’ filename   条件(Pattern)[一般使用关系表达式作为条件]: x>10  判断变量 x是否大于10  x>=10  大于等于  x  动作(Action):  格式化输出:print...
分类:其他好文   时间:2014-10-05 11:32:58    阅读次数:166
带条件的分页
一、后台     ①分类的list .jsp中的流程控制改成JSTL实现          script type ="text/javascript" src="script/jquery-1.7.2.js">script>          script type ="text/javascript">             $ (function (){    ...
分类:其他好文   时间:2014-10-05 09:52:39    阅读次数:252
run C source file like a script
TinyCC http://bellard.org/tcc linux 平台”C-script”: 哈哈#!/usr/local/bin/tcc -run#include #include double fac(double n){ if (n \n", argv[0]); return -...
分类:其他好文   时间:2014-10-04 16:03:16    阅读次数:182
uplevel
uplevel - Execute a script in a different stack framesuppose that procedure a was invoked from top-level, and that it called b, and that b called c. S...
分类:其他好文   时间:2014-10-04 13:49:46    阅读次数:186
SHELL syntax error:unexpected end of file 提示错误
SHELL syntax error:unexpected end of file 提示错误if [ -n "$1" ]then echo "111"else echo "222"fiexit 0 执行sh my.sh par 提示syntax error:unexpected end of ...
分类:其他好文   时间:2014-10-04 13:40:56    阅读次数:163
shell script 的追踪与 debug
shell script 的追踪与 debug scripts 在运行之前,最怕的就是出现语法错误的问题了!那么我们如何 debug 呢?有没有办法不需要透过直接运行该 scripts 就可以来判断是否有问题呢?呵呵!当然是有的!我们就直接以 bash 的相关参数来进行判断吧![root@www ....
分类:其他好文   时间:2014-10-04 13:27:06    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!