摘要:适合于字符模式 :-)
环境:redhat gnu/linux + ksh/bash#!/bin/ksh
#scriptname:locktty
#writed by :kornlee
#script start...
reset;clear #清除屏幕
info="system will be locked!!! press waitting....."
p......
摘要:bash和kornshell的累加测试,发现bash计算的结果是正确滴,而ksh(pdksh)确得到了意想不到的结果?/home/lee#bash
/home/lee#echo $((1000000*(1000000+1)/2))
500000500000
/home/lee#echo
bash
/home/lee#exit
/home/lee#echo
-ksh
/home......
prevent undeliberate/unintended/accident remove 【程序编程相关:
喜欢玩俄罗斯方块的可以看看】 【推荐阅读:
为什么上海盛大能成功?(5)】 【扩展信息:
3D游戏引擎设计与实现(3)】#!/bin/sh #把rm作alias,实际是mv到某个位置 # based on others scripts, original cannot find. # suggestion welcomed to aaronthepro at gmail dot com #usage: # alias rm=/path_to_this/del.sh # remove: $ rm files # restore: $ rm -r files # use \rm to call original rm. #bug: failed if filename contains space #fixed: for myfile in "$*", and add "" for all myfile instances #and change spaces to ^ #bug: failed for multi files if add "$*", #fix: just because "" in for myfile in "$*" above, get rid of #fix: i have to remove spaces before using this script: # alias rmspace=rename \y/\ /_/\ # the rename is from perl # i had tried to use (dirname $myfile) to replace (pwd) to save two cd, # but dirname is relative to current working dir, not absolute dir. ...
下一页 摘要:ed是基于行的文本编辑器,可以用于创建,修改,显示文本文件. ed有命令模式和输入模式,在命令模式下ed接受指令,而在输入模式, ed对文件进行修改,输入.在命令模式下,输入a,c和i指令可以进入输入模式,在输入模式下,输入"."然后回车,则回到命令模式,很方便切换!ed的语法:ed [-] [-g] [-s] [-p string] file
解释:
file #被打开的文件名
-g #提......