
shell
wtysksk
这个作者很懒,什么都没留下…
展开
-
ubuntu bash批量解压rar文件
代码 如下:#!/bin/sh#unrar files#source .rar file pathdocSrc="..."#save unrar file pathunfileSrc="..."#log file recodes errorerrorPath="..."if [ ! -f $errorPath ] then touch $errorPath原创 2012-12-24 15:14:36 · 1883 阅读 · 0 评论 -
linux /bin/sh与/bin/bash有区别么(DashAsBinSh)
rt.原文链接:http://www.cppblog.com/erran/archive/2012/05/24/176038.htmlubuntu官网:https://wiki.ubuntu.com/DashAsBinSh转载 2012-12-27 18:53:52 · 892 阅读 · 0 评论 -
dedeCMS等类似系统将gbk版本转换为utf-8版本(gbk to utf-8)
一、为什么要将gbk转换为utf-8?gbk编码与utf-8有什么区别?在织梦DedeCMS官方发布的版本中(其他的如discuz等),主要有两个版本。一个是GBK版本,一个是UTF-8版本,从程序实现的功能上来说,织梦Dedecms的GBK版本与UTF-8版本功能是一样的,没有本质的区别,只不过编码方式不同而已。物尽其用,织梦出这两个版本的原因也是为了满足不同人的不同需要,只要能实现你想原创 2013-06-05 13:49:08 · 1812 阅读 · 0 评论 -
bash shell计算出一个目录下所有文件的大小
脚本如下: 1 #! /bin/bash 2 DIR=$1 3 [ ! -d "$DIR" ] && (echo "argument is not a directory.";exit 1) 4 if [ "$?" -eq 1 ];then 5 exit 6 fi 7 cd $DIR 8 pwd 9 for f in $(ls $DIR) 1原创 2013-07-09 19:17:39 · 2144 阅读 · 0 评论