grep '[1-9]' 鏂囦欢鍚 //鍖归厤鍚湁1鍒9鏁板瓧
grep '[^1-9]' 鏂囦欢鍚 //鍖归厤闄や簡1-9鏁板瓧鐨勫叾浠栧瓧绗
grep '^root' 鏂囦欢鍚 //^鍙樻垚澶村瓧绗 浠oot寮澶
grep '^$' 鏂囦欢鍚 //澶村拰灏惧姞璧锋潵 鍖归厤绌鸿
grep '\.' 鏂囦欢鍚 //鍖归厤.
grep '\w' 鏂囦欢鍚 //绛夊悓([a-zA-Z1-9_])
grep '\W' 鏂囦欢鍚 //绛夊悓([^a-zA-Z1-9_])
grep '\b' 鏂囦欢鍚 //琛ㄧず鍗曡瘝鍒嗛殧 濡 \b[a]\b 灏辨槸a
grep 'sb\+' 鏂囦欢鍚 //鍖归厤鑷冲皯鍑虹幇涓娆$殑sb
grep 'sb*' 鏂囦欢鍚 //鏈塻鎴栬卋閮藉彲浠
grep '.' 鏂囦欢鍚 //鍖归厤浠绘剰瀛楃
淇敼閰嶇疆鏂囦欢
sed鐨勫鐞嗗師鍒欐槸琛屽鐞嗭紝鑰屼笖涓嶆敼鍙樻簮鏂囦欢
sed [options] 鈥榗ommand鈥 file(s) //鍛戒护琛屾牸寮
sed 'p' passwd #浼氭墦鍗板嚭涓よ,鍥犱负sed鐨勫師鐞嗘槸璇诲叆涓琛岋紝杈撳嚭涓琛岋紝姝ゅ鍐嶅姞涓妏鍛戒护鎵撳嵃鍑烘潵鐨勪竴琛岋紝鎵浠ユ渶鍚庝細鎵撳嵃鍑轰袱琛
sed -n 'p'passwd #鍔犱簡-n閫夐」涔嬪悗锛屽彧浼氭墦鍗板嚭鐩稿叧鐨勮锛岄偅浜涗笉鐩稿叧鐨勮鍒欎笉浼氭墦鍗板嚭鏉
鍙戣〃鍥炲