我有一个大文本文件,中间包含一个唯一的字符串.我想要做的是使用grep打印字符串之后的所有内容.
cat textfile | grep "target_string"
This highlights target_string but prints the whole file
cat textfile | grep -o "target_string"
This prints only target_string
cat textfile | grep -o "target_string*"
This prints only target_string
Run Code Online (Sandbox Code Playgroud)
如何在target_string之后打印所有内容之前没有任何内容?