当前位置: 首页 > news >正文

房地产网站加盟平面设计素材图

房地产网站加盟,平面设计素材图,苏州建设人才网官网,网站要怎么盈利1 grep grep 命令,用来搜索字符串所在位置,可以具体到不同文件,不同行; 在Linux 下,查看命令释义如下 zhaocubuntu2004:~$ grep --help Usage: grep [OPTION]... PATTERNS [FILE]... Search for PATTERNS in each FI…

1 grep

grep 命令,用来搜索字符串所在位置,可以具体到不同文件,不同行;
在Linux 下,查看命令释义如下

zhaoc@ubuntu2004:~$ grep --help
Usage: grep [OPTION]... PATTERNS [FILE]...
Search for PATTERNS in each FILE.
Example: grep -i 'hello world' menu.h main.c
PATTERNS can contain multiple patterns separated by newlines.Pattern selection and interpretation:-E, --extended-regexp     PATTERNS are extended regular expressions-F, --fixed-strings       PATTERNS are strings-G, --basic-regexp        PATTERNS are basic regular expressions-P, --perl-regexp         PATTERNS are Perl regular expressions-e, --regexp=PATTERNS     use PATTERNS for matching-f, --file=FILE           take PATTERNS from FILE-i, --ignore-case         ignore case distinctions in patterns and data--no-ignore-case      do not ignore case distinctions (default)-w, --word-regexp         match only whole words-x, --line-regexp         match only whole lines-z, --null-data           a data line ends in 0 byte, not newlineMiscellaneous:-s, --no-messages         suppress error messages-v, --invert-match        select non-matching lines-V, --version             display version information and exit--help                display this help text and exitOutput control:-m, --max-count=NUM       stop after NUM selected lines-b, --byte-offset         print the byte offset with output lines-n, --line-number         print line number with output lines--line-buffered       flush output on every line-H, --with-filename       print file name with output lines-h, --no-filename         suppress the file name prefix on output--label=LABEL         use LABEL as the standard input file name prefix-o, --only-matching       show only nonempty parts of lines that match-q, --quiet, --silent     suppress all normal output--binary-files=TYPE   assume that binary files are TYPE;TYPE is 'binary', 'text', or 'without-match'-a, --text                equivalent to --binary-files=text-I                        equivalent to --binary-files=without-match-d, --directories=ACTION  how to handle directories;ACTION is 'read', 'recurse', or 'skip'-D, --devices=ACTION      how to handle devices, FIFOs and sockets;ACTION is 'read' or 'skip'-r, --recursive           like --directories=recurse-R, --dereference-recursive  likewise, but follow all symlinks--include=GLOB        search only files that match GLOB (a file pattern)--exclude=GLOB        skip files that match GLOB--exclude-from=FILE   skip files that match any file pattern from FILE--exclude-dir=GLOB    skip directories that match GLOB-L, --files-without-match  print only names of FILEs with no selected lines-l, --files-with-matches  print only names of FILEs with selected lines-c, --count               print only a count of selected lines per FILE-T, --initial-tab         make tabs line up (if needed)-Z, --null                print 0 byte after FILE nameContext control:-B, --before-context=NUM  print NUM lines of leading context-A, --after-context=NUM   print NUM lines of trailing context-C, --context=NUM         print NUM lines of output context-NUM                      same as --context=NUM--color[=WHEN],--colour[=WHEN]       use markers to highlight the matching strings;WHEN is 'always', 'never', or 'auto'-U, --binary              do not strip CR characters at EOL (MSDOS/Windows)When FILE is '-', read standard input.  With no FILE, read '.' if
recursive, '-' otherwise.  With fewer than two FILEs, assume -h.
Exit status is 0 if any line (or file if -L) is selected, 1 otherwise;
if any error occurs and -q is not given, the exit status is 2.Report bugs to: bug-grep@gnu.org
GNU grep home page: <http://www.gnu.org/software/grep/>
General help using GNU software: <https://www.gnu.org/gethelp/>

2 搜索方式

2.1 通用格式

我目前使用的命令,通用格式如下

grep <命令选项(可选)> <附加命令项(可选)> <带搜索字符串(支持正则)> <路径(默认为当前路径)>

2.2 当前路径搜索

在当前路径搜索特定字符串,并显示出对应行数

grep -rn "zhaoc"

在这里插入图片描述

2.3 指定路径搜索

grep -rn zhaoc  ~/11-tools/

在这里插入图片描述

2.4 搜索指定文件类型

grep -rin --include=*.h --include=*.cpp foo <可选搜索路径>

实际操作,举例如下:

zhaoc@ubuntu2004:~$ date; grep -rn --include="*h" include ~/gitRepository/UsefulWheels/
20231231日 星期日 22:18:09 CST
/home/zhaoc/gitRepository/UsefulWheels/LinuxCppInterface/BasicInclude.h:4:#include <iostream>
/home/zhaoc/gitRepository/UsefulWheels/LinuxCppInterface/BasicInclude.h:5:#include <string>
/home/zhaoc/gitRepository/UsefulWheels/LinuxCppInterface/BasicInclude.h:6:#include <string.h>
/home/zhaoc/gitRepository/UsefulWheels/LinuxCppInterface/BasicInclude.h:7:#include <vector>
/home/zhaoc/gitRepository/UsefulWheels/LinuxCppInterface/CppWheels_Other.h:4:#include "BasicInclude.h"
/home/zhaoc/gitRepository/UsefulWheels/LinuxCppInterface/CppWheels_Other.h:5:#include "Linuxcpptypes.h"
/home/zhaoc/gitRepository/UsefulWheels/LinuxCppInterface/CppWheels_String.h:4:#include "BasicInclude.h"
/home/zhaoc/gitRepository/UsefulWheels/CppInterface/CppWheels_String.h:4:#include <iostream>
/home/zhaoc/gitRepository/UsefulWheels/CppInterface/CppWheels_String.h:5:#include <string>
/home/zhaoc/gitRepository/UsefulWheels/CppInterface/CppWheels_String.h:6:#include <vector>
http://www.yayakq.cn/news/722857/

相关文章:

  • 盐城网站制作哪家好推荐佛山顺德网站建设
  • 做网站的公司那家好。wordpress怎样静态化
  • 做淘宝客可以有高佣金的网站上海网站设计制作报价
  • 信用徐州网站建设情况做电子简历的网站
  • 网站改版会影响排名吗营销网站建设的原则
  • 网站地图怎么添加网站栏目做跳转后不显示
  • 杭州网站免费制作免费搭建平台网站
  • 视频网站建设服务网站添加qq聊天
  • 盐田区住房和建设局网站做网站的公司哪个好
  • 站外推广6种方法自己做的优惠卷网站怎么进商品
  • 中国建设银行洛阳分行官网站抖音的电子商务网站建设
  • 东莞seo建站优化收费有口碑的坪山网站建设
  • 手机下载视频网站模板下载失败高端网站建设南京
  • WordPress网络管理功能南宁seo收费
  • 网站链接设计做网站什么硬盘好
  • 网站技术介绍外包公司做网站价格
  • 便宜的网站建设公司网页设计作品展示图片
  • 企业网站asp自己网站怎么做优化
  • 北京网站建设方案建设公司山东聊城建设学校网站
  • 免费个人网站怎么制作linux wordpress 下载
  • 做互助盘网站做传奇网站
  • 信誉比较好的网上做任务的网站php兼职平台
  • 建站公司 网络服务诸暨 外贸网站建设
  • 自己做一个网站多少钱做外单网站有哪些内容
  • 免费海报模板网站四川住房城乡建设厅网站
  • 网站原创文章在哪里找沈阳百度关键词推广
  • 特价旅游机票网站建设wordpress 怎么设置
  • 文明网站建设情况城市文化建设的网站
  • 哪个公司建设网站网站建设进度表 免费下载
  • 建设宠物店网站北京市保障房建设投资中心网站瘫痪