linux涓夊ぇ鍒╁櫒–grep|sed|awk

grep

grep 姣旇緝绠鍗 鏌ユ壘鏂囨湰绂讳笉寮姝e垯 鍏蜂綋鐢ㄦ硶濡備粠绠鍗曞埌澶嶆潅濡
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鐨勬牸寮

sed [options] 鈥榗ommand鈥 file(s) //鍛戒护琛屾牸寮
sed 'p' passwd #浼氭墦鍗板嚭涓よ,鍥犱负sed鐨勫師鐞嗘槸璇诲叆涓琛岋紝杈撳嚭涓琛岋紝姝ゅ鍐嶅姞涓妏鍛戒护鎵撳嵃鍑烘潵鐨勪竴琛岋紝鎵浠ユ渶鍚庝細鎵撳嵃鍑轰袱琛
sed -n 'p'passwd #鍔犱簡-n閫夐」涔嬪悗锛屽彧浼氭墦鍗板嚭鐩稿叧鐨勮锛岄偅浜涗笉鐩稿叧鐨勮鍒欎笉浼氭墦鍗板嚭鏉

All posts

Other pages


Deprecated: 鏂囦欢 娌℃湁 comments.php 鐨勪富棰 鑷増鏈 3.0.0 璧峰凡寮冪敤锛屼笖娌℃湁鍙敤鐨勬浛浠c 璇峰湪鎮ㄧ殑涓婚涓寘鍚竴涓 comments.php 妯℃澘銆 in /www/wwwroot/liguoqi.site/wp-includes/functions.php on line 6078

鍙戣〃鍥炲

鎮ㄧ殑鐢靛瓙閭鍦板潃涓嶄細琚叕寮銆 蹇呭~椤瑰凡鐢 * 鏍囨敞