Linux |
mllm © 2004-2012, allblue #!/bin/sh MAILDIRARC=`which maildirarc` if [ $# -lt 2 ] ; then echo "USAGE: $0 maildir targetdir" echo " e.g.: $0 /home/foo/.local/share/evolution/mail/local /opt/my_mailbox_backup" exit 1; fi if [ $# -gt 0 -a -d $1 ];then cd $1 for file in .* do if [ -d "$file/cur" ];then if [ "$file" = "." ];then $MAILDIRARC -d 0 -c -m $2/Inbox $1/$file else $MAILDIRARC -d 0 -c -m $2/${file#*.} $1/$file fi fi done fi Parsed in 0.011 seconds |
|||
假设有变量 var=http://www.linuxidc.com/test.htm 一 # 号截取,删除左边字符,保留右边字符。 二 ## 号截取,删除左边字符,保留右边字符。 三 %号截取,删除右边字符,保留左边字符 四 %% 号截取,删除右边字符,保留左边字符 echo ${var%%/*} 五 从左边第几个字符开始,及字符的个数 六 从左边第几个字符开始,一直到结束。 七 从右边第几个字符开始,及字符的个数 八 从右边第几个字符开始,一直到结束。 注:(左边的第一个字符是用 0 表示,右边的第一个字符用 0-1 表示) |
|||
mllm © 2004-2012, allblue rm ~/.local/share/recently-used.xbel #create a new empty file: touch ~/.local/share/recently-used.xbel #make sure the new file cannot be modified: sudo chattr +i ~/.local/share/recently-used.xbel #now, your display of recent items is gone. #If you want to revert back, remove the i attribute of recently-used.xbel: sudo chattr -i ~/.local/share/recently-used.xbel Parsed in 0.009 seconds |
|||
Apache中有不少变量支持Env变量,但是CGI中的Request相关信息的变量,却不是每个module都能拿到的,这部分信息绝大部分可以在mod_rewrite中拿到。需要专递这些信息,主要是要把mod_rewrite中特有的这些变量设置到env中就可以了,类似如下。 mllm © 2004-2012, allblue RewriteEngine on RewriteCond %{REMOTE_PORT} (.*) RewriteRule .* - [E=P_R:%1] Parsed in 0.008 seconds 把所有的变量正则回溯到组1中,然后设置一个泛匹配,但以横线表面此规则不改动原来的URL,在FLAG区进行ENV的设置。然后在其他module中再取用这个新创建的ENV变量即可。 |
|||
smbclient正确登入后会有一个shell,类似ftp的指令集,但也可以用脚本输入,这里简单记一下,常用的几句。 mllm © 2004-2012, allblue smbclient //1.2.3.4/共享名 -U 用户名%密码 -W 域 smbclient //1.2.3.4/共享名 -A ~/.domain/.authentication smbclient //1.2.3.4/共享名 -A ~/.domain/.authentication -c 'get abc.xlsx' Parsed in 0.009 seconds |
|||
每条记录对应一个软件包, 注意每条记录的第一, 二, 三个字符. 这就是软件包的状态标识, 后边依此是软件包名称, 版本号, 和简单描述. |
|||
最新评论
1 年 17 周之前
1 年 17 周之前
1 年 17 周之前
1 年 29 周之前
1 年 29 周之前
1 年 48 周之前
2 年 8 周之前
2 年 9 周之前
2 年 37 周之前
2 年 40 周之前