cleanemacs.sh

来自「pic 模拟程序!面向对象」· Shell 代码 · 共 28 行

SH
28
字号
#!/bin/bash## File:		cleanemacs.sh## Purpose:	Replace lines containing only whitespace with empty lines.#		Emacs tends to make such lines, and they ruin the paragraph#		feature of vi## Version:	$Id: cleanemacs.sh,v 1.1 2005/07/09 19:52:54 cary Exp $#######################################################################for i in .h .cpp .cxx Makefile.am; do  files=`ls *$i 2>/dev/null`  if test -n "$files"; then    for i in $files; do      # echo Testing $i      haswsl=`grep '^[ \t]+*$' $i`      if test -n "$haswsl"; then        echo File $i has whitespace-only lines!        mv $i $i.orig        sed 's/^[ \t]+*$//' <$i.orig >$i      fi    done  fidone   

⌨️ 快捷键说明

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