zoukankan      html  css  js  c++  java
  • 趣味Shell

    Richard M. Stallman大神是谁就不用说了,一时来了兴趣,想看看Linux系统下有多少程序有这位大神参与编写的。

    先把所有命令导出到文件中,遍历所有命令,用man手册查一下并过滤Stallman关键词。

    以下是脚本

    #!/bin/bash
    i=0;
    touch Stallman
    ls /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games > command
    for line in `cat command`
    do
    	man $line | grep Richard M. Stallman
    	if [ $? -eq 0 ]
    	then
    		i=`expr $i + 1`
    		echo $i $line >> Stallman
    		man $line | grep Richard M. Stallman >> Stallman
    	fi
    done
    
    rm command


    我的系统是Ubuntu11.04的,查找到以下程序。

    1 cat
           Written by Torbjorn Granlund and Richard M. Stallman.
    2 dir
           Written by Richard M. Stallman and David MacKenzie.
    3 ls
           Written by Richard M. Stallman and David MacKenzie.
    4 rm
           Written by Paul Rubin, David MacKenzie, Richard M. Stallman, and Jim Meyering.
    5 vdir
           Written by Richard M. Stallman and David MacKenzie.
    6 comm
           Written by Richard M. Stallman and David MacKenzie.
    7 gdb
           `gdb'  entry  in  info;  Using GDB: A Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H.
    8 gdbtui
           `gdb'  entry  in  info;  Using GDB: A Guide to the GNU Source-Level Debugger, Richard M. Stallman and Roland H.
    9 split
           Written by Torbjorn Granlund and Richard M. Stallman.
    10 tee
           Written by Mike Parker, Richard M. Stallman, and David MacKenzie.
    11 uniq
           Written by Richard M. Stallman and David MacKenzie.


  • 相关阅读:
    “==”和equals方法的区别
    一个睡五分钟等于六个钟头的方法
    依赖、关联、聚合、组合
    关于AOP /IOC / DI
    Java中equals方法比较的是什么?
    JAVA 程序题
    jQuery EasyUI 笔记 DataGrid
    C#利用QrCode.Net生成二维码(Qr码)
    由【酷狗音乐】所联想到的C/S界面设计
    VS2010中CodeSnippet【代码段】应用与创建
  • 原文地址:https://www.cnblogs.com/java20130726/p/3218666.html
Copyright © 2011-2022 走看看