2012-02-09 2 views
2

私は、このファイルの呼び出しhelloworld.txtありますgrepを使ってファイルから正確な単語を出力する方法は?

starthelloworld_some_text.jpgend
starthelloworld_different_text.jpgend
starthelloworld_another_different_one.jpgend

を、私はGrepのはこれだけのように表示したいと思います:

helloworld_some_text.jpg
helloworld_different_text.jpg
helloworld_another_different_text.jpg

I初心者と本当に皆さんからの助けを必要としています。私にいくつかの方法を教えてください、本当にありがとうございます。どうもありがとう。

答えて

4

grep -o "hello.*\.jpg" helloworld.txt

+0

甘いです。ありがとう – Vicheanak

関連する問題