免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库

动态

2014-12-31

2014-12-11

2014-11-12

  • fufelixzh 发表了新话题 2014-11-12 13:22
    文本替换字符串
    将文本中inject_wise 换成inject_win 要求将原文替换,然后生成一个备份文件。 可以用^I or Tie:FILE. 如果不是替换原文件,我的思路是 read $fd1, print ...

2014-09-16

  • fufelixzh 发表了新话题 2014-09-16 16:06
    c语言select 写集有什么作用
    count=select(max_fd+1,&rfd,NULL,NULL,&timeout); select都是检测读集,写集为NULL, 从读集中read sockfd后,wirte sockfd即可通信。 请问写集有什么用呢。 ...
  • fufelixzh 发表了新话题 2014-09-16 12:12
    多线程
    pthread_join 可以检测子线程的返回值,即子线程的状态。但是它是阻塞的。 pthread_detach 是非阻塞的,但是它不能获得子线程的状态。 如何实现,即可以获取 ...

2014-07-03

  • fufelixzh 发表了新话题 2014-07-03 14:21
    字符串如何转成数组
    path="/bld/username" str=`ls $path |egrep '(^s)'` set -A a a=$str 假设 str是这样 sa1 sb3 sc5 仅仅a[0]有值,不是a[0],a[1],a[2]分别有 ...

2014-05-11

  • fufelixzh 发表了新话题 2014-05-11 14:47
    为什么不能写文件
    写文件是0k njcgpb:felixzh/temp/perl >> cat addline.pl #!/usr/bin/perl -w foreach my $file (glob "*.tcl") { print "$file\n"; ...

2014-04-21

  • fufelixzh 发表了新话题 2014-04-21 16:38
    trap用法
    while [ 1 ]; do trap "start_thread" SIGRTMIN done start_thread 是一个子函数 trap这句是什么意思

2014-04-19

  • fufelixzh 发表了新话题 2014-04-19 19:48
    怎么检测 shell 并行结果
    如何等待并行的脚本结果 cat 1.sh ./2.sh & ./3.sh & ./4.sh & ./5.sh & ./6.sh & 如何check 2.sh 3.sh etc results. 即同时获取多个shell的返回值,不 ...

2014-03-21

  • fufelixzh 发表了新话题 2014-03-21 15:27
    getopts
    ./3.sh -d k -u felixzh -p er 只有-u好用;why -d,-p不好用呢 bldr:/home/felixzh >> cat 3.sh set -x ValidOptions="d:hp:u:" while getopts $Valid ...

2014-03-07

  • fufelixzh 发表了新话题 2014-03-07 15:22
    perl 插入行
    请用perl实现,关键字是diskinfo,在diskinfo的前一行加#add by abc,后一行加print (stderr,"abc line111 \n") cat 1.txt fdfa sort_diskinfo() print1 ...

2014-01-25

  • fufelixzh 发表了新话题 2014-01-25 18:24
    shell input
    Do you know the script where is wrong for getting timestamp cd $1 while read line do echo "line2line" item7=`echo $line|nawk -F " " '{ ...

2014-01-20

  • fufelixzh 发表了新话题 2014-01-20 17:19
    solaris statvfs函数问题
    我发现solaris statvfs 在超过2T的磁盘上运行失败。 如 if (statvfs(temp, &fsbuf) < 0) return(0); tot_space = fsbuf.f_bavail * (fsbuf.f_frsize / 512); ...
  • fufelixzh 发表了新话题 2014-01-20 17:17
    solaris statvfs
    我发现solaris statvfs 在超过2T的磁盘上运行失败。 如 if (statvfs(temp, &fsbuf) < 0) return(0); tot_space = fsbuf.f_bavail * (fsbuf.f_frsize / 512); ...

2014-01-09

2013-12-01