ファイル1:
hello
- dictionary definitions:
hi
hello
hallo
greetings
salutations
no more hello for you
-
world
- dictionary definitions:
universe
everything
the globe
the biggest tree
planet
cess pool of organic life
-
これを(単語の膨大なリストの場合)用語から定義形式(用語ごとに1行)にフォーマットする必要があります。どうすればこれを達成できますか?単語はどれも同じではなく、上記の構造だけが同じです。結果のファイルは次のようになります。
hello - dictionary definitions: hi hello hallo greetings salutations no more hello for you -
world - dictionary definitions: universe everything the globe the biggest tree planet cess pool of organic life -
Awk / Sed / Grep/Catが通常の候補です。