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

📄 ex52.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# Uudecodes all uuencoded files in current working directory.lines=35        # Allow 35 lines for the header (very generous).for File in *   # Test all the files in $PWD.do  search1=`head -n $lines $File | grep begin | wc -w`  search2=`tail -n $lines $File | grep end | wc -w`  #  Uuencoded files have a "begin" near the beginning,  #+ and an "end" near the end.  if [ "$search1" -gt 0 ]  then    if [ "$search2" -gt 0 ]    then      echo "uudecoding - $File -"      uudecode $File    fi    fidone  #  Note that running this script upon itself fools it#+ into thinking it is a uuencoded file,#+ because it contains both "begin" and "end".#  Exercise:#  --------#  Modify this script to check each file for a newsgroup header,#+ and skip to next if not found.exit 0

⌨️ 快捷键说明

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