linux grep命令;显示文件/etc/ssh/sshd_config中以字母开头的所有行[重复]

rkue9o1l  于 2023-02-15  发布在  Linux
关注(0)|答案(1)|浏览(172)
    • 此问题在此处已有答案**:

How to grep for case insensitive string in a file?(3个答案)
grep lines that start with a specific string(2个答案)
How to use the grep with globs patterns? (like we use it in find command)(2个答案)
Regex to match only letters(20个答案)
昨天关门了。
显示文件/etc/ssh/sshd_config中以字母开头的所有行。
包括大写字母
下面是我尝试

#!/bin/bash
grep -i 'n*' /etc/ssh/sshd_config
ffscu2ro

ffscu2ro1#

就像这样:

grep '^[[:alpha:]]' /etc/ssh/sshd_config

相关问题