find string in file (need to be improved)
来源:互联网 发布:now直播软件下载 编辑:程序博客网 时间:2024/06/06 16:25
maybe it will be useful when we want to find a variable in a directory.
target=$1traversal(){ cd "$1" for x in * do if [ -f $x ] then #echo $x grep $target $x>null if [ $? = 0 ] then echo $PWD/$x fi fi if [ -d $x ] then traversal "$PWD/$x" fi done}traversal $PWD
use like this
./a.sh call
- find string in file (need to be improved)
- To be improved
- Things Need To Be Done in 2016
- GWT in practice: some parts need to be learned later
- All I Need To Know To Be A Better Programmer I Learned In Kindergarten
- Why does a destructor in base class need to be declared virtual?
- 120.For which database operation would you need the database to be in the MOUNT state?
- How to find the file which contain a specified string
- need to expert in flieds
- How to find a file in MS-DOS
- The things need to be bloged
- A book need to be read
- Windows GUI stuffs need to be memorized
- Find in file
- Find in Large File
- [LeetCode] Implement strstr() to Find a Substring in a String
- Find All Anagrams in a String Add to List
- Title1:sometimes we need to find out
- Java中的重写
- Android编译系统的架构 简述
- 程序员必知生活经验
- Android基础知识(一)
- uva10494---BigNumber
- find string in file (need to be improved)
- 代码评审悟道
- uva Volume1 BigNumber 总结
- Java中的多态
- 队列ADT实现
- OOA和OOD
- 由拖库攻击谈口令字段的加密策略
- C#使用-Find方法(续)
- 从U盘来安装Win7