-2
私は複数の段落を持つファイルを持っています。私はちょうど段落を引っ張りたい。与えられた文字列を含む各ブロックを見つける方法
私はこの質問
Given line separated blocks of text, how can I return each block which contains a specific keyword?
を参照するが、溶液は私のために働いていません。ここで
は私のデータの一例
* This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. (STOP-String-023)
* This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. (Search-String-085)
Here is random text. Here is random text.
* This is a block of text it goes on and on. This is a block of text it goes on and on. This is a block of text it goes on and on. (Search-String-035)
Some text here
Some text here
である私は(Search-String...
私はこれをどのように行うかまでの段落の先頭からテキストだけを引くしたいですか?
awk -v RS= '/Search-String[^\n]/ text.txt
コマンドが機能しません。
コード/データの前に4つの空白を付けます。 [edit-help](http://stackoverflow.com/editing-help)を見てください。 – Cyrus
「検索文字列」、「085」、「035」のどの文字列ですか?また、 "ちょうど"を引っ張る? – NetMage
私はあなたの質問をより理にかなって編集するために全力を尽くしましたが、私は終わりに達しました。あなたが質問を作成することをとても怠っている場合、人々はあなたを助ける傾向がありません。そして、「フレーズブックプログラミング」を使って有用なソフトウェアを書くことを期待しないでください。 – Borodin