我想删除文件中具有特定字符'?‘的所有行/行。就我的情况而言。我希望在Bash、AWK或Perl中只有一行命令。谢谢
发布于 2011-05-31 22:21:36
perl -i -ne'/\?/ or print' file
或
perl -i -pe's/^.*?\?.*//s' file
https://stackoverflow.com/questions/6188211
相似问题