⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 findstring.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# findstring.sh:# Find a particular string in the binaries in a specified directory.directory=/usr/bin/fstring="Free Software Foundation"  # See which files come from the FSF.for file in $( find $directory -type f -name '*' | sort )do  strings -f $file | grep "$fstring" | sed -e "s%$directory%%"  #  In the "sed" expression,  #+ it is necessary to substitute for the normal "/" delimiter  #+ because "/" happens to be one of the characters filtered out.  #  Failure to do so gives an error message (try it).done  exit 0#  Exercise (easy):#  ---------------#  Convert this script to take command-line parameters#+ for $directory and $fstring.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -