以前のPostに関連するテキスト。私はファイル内に存在するテキストに基づいていくつかの接頭辞を追加したかったのです。PerlまたはBash - プレフィックス、削除、スワップテキスト
私の次のジグソーパズル - テキストを少し操作して、しばらく掘り下げています。
マイファイルになりました示しています(行は異なるテキスト連絡いたします - すべてではない同じようなIMの上映を)
Denver.Line 1 ExtraText I need this information
Denver.Line 2 ExtraText I need this information
Denver.Line 3 ExtraText I need this information
New York.Line 1 ExtraText I need this information
New York.Line 2 ExtraText I need this information
私は
The place is called Denver.Line 1 and we say "I need this information"!
The place is called Denver.Line 2 and we say 'I need this information'!
The place is called Denver.Line 3 and we say 'I need this information'!
The place is called New York.Line 1 and we say 'I need this information'!
The place is called New York.Line 2 and we say 'I need this information'!
..だから私は接頭辞に必要 を必要とします"私は" ExtraText "を削除し、"と私たちは言う "" 私はそれぞれの行を追加する必要があります "を削除する必要があります!
ここでは教祖に感謝します。
"ExtraText" 実際の文字列 "ExtraText"、または任意の文字列ですか? –
入力ファイルはタブで区切られていますか? – ikegami