最终确定是shell环境问题,临时改为/bin/bash即可查看.1.问题现象# su - jingyu$ iduid=503(jingyu) gid=507(jingyu) groups=507(jingyu)$ ulimit -aulimit: Command not found.2.临时切换为...
分类:
其他好文 时间:
2014-09-29 00:07:16
阅读次数:
252
希尔排序(Shellsort)的名称源于它的发明者Donald Shell,该算法是冲破二次时间屏障的第一批算法之一。不过,自从它最初被发现,又过了若干年才证明了它的亚二次时间界。它通过比较相距一定间隔的元素来工作;各趟比较所用的距离随着算法的进行而减小,直到只比较相邻元素的最后一趟排序为止。希尔排...
分类:
其他好文 时间:
2014-09-28 23:13:15
阅读次数:
251
基本输入输出函数1 #include 2 3 int main(){4 int a,b;5 while(scanf("%d %d",&a,&b)>=0){6 printf("%d\n",a+b);7 }8 return 0;9 }
分类:
其他好文 时间:
2014-09-28 23:08:05
阅读次数:
176
简单的示例Shell程序示例1.#!/bin/bash
#This is to show what a shell script looks like
echo "Our first example"
echo # This inserts an empty line in output.
echo "We are currently in the following directory."
/b...
分类:
其他好文 时间:
2014-09-28 20:05:46
阅读次数:
266
file1-file2 => file3file1=/data/aaafile2=/data/bbbfile3=/data/cccsort -m $file3
分类:
系统相关 时间:
2014-09-28 19:54:45
阅读次数:
179
问题:出现declare:not found的提示解决:原来,UBUNTU用的是dash(后来证明这个其实这个不是错误的原因:从#!/bin/bash到#!/bin/dash,依旧无法运行,在这写出这一点只为引起以后的注意)只需要用sudo dpkg-reconfigure dash指令然后在出现的...
分类:
其他好文 时间:
2014-09-28 19:48:35
阅读次数:
181
1. 使用grep(结果带括号,不知道有没有办法仅把括号中的内容匹配出来)$a='abc[edg]adfirpqu'$echo $a|grep -o '\[.*\]' #中括号的处理需要转义[edg]$b='abc(edg)adfirpqu'$echo $b|grep -o '(.*)'(edg)....
分类:
其他好文 时间:
2014-09-28 19:40:35
阅读次数:
209
可以看一下以下UIPasteboard的用法 -(void)writeValueInAppOne { UIPasteboard *myUIPasteboard = [UIPasteboard generalPasteboard]; printf("myUIPasteboard.string %s\n...
分类:
移动开发 时间:
2014-09-28 19:38:25
阅读次数:
318
Pig 在 Shell中使用,批量加载处理文件...
分类:
其他好文 时间:
2014-09-28 19:16:54
阅读次数:
167
#!/bin/bash
IP=`awk‘{print$1}‘/home/bash/mima.txt`
foriin$IP
do
{port=`grep$i/home/bash/mima.txt|awk‘{print$2}‘`
pawd=`grep$i/home/bash/mima.txt|awk‘{print$3}‘`
expect<<EOF
spawnssh-p$portroot@$i;
expect{
"(yes/no)?"{send"yes\r"}
"password:"{send"$pa..
分类:
其他好文 时间:
2014-09-28 18:43:36
阅读次数:
133