常用命令收集 发表于 2022-04-19 更新于 2025-04-22 分类于 shell 按照文件行数排序find . -iregex ".*\.h\|.*\.hpp\|.*\.c\|.*\.cpp" -type f | xargs -I {} wc -l {} |sort -n -r idea部分替换 贪婪模式 hello\((.*)\,.*\) $1 表示上面被括号包起来的部分,类似sed, $0 表示全部, $1 表示第一个 非贪婪模式 使用?表示这次匹配是非贪婪的, 采用最小匹配原则 hello\((.*)?\,.*\)