Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はテキストファイルを持っています:
a b n d f h e f y
私はそれを編集して次のようにしたい:
a b@gmail.com n d f@gmail.com h e f@gmail.com y
これどうやってするの?役立つコマンドはありますか?
この awk ワンライナーを試してください:
$ awk '$2=$2"@gmail.com"' file a b@gmail.com n d f@gmail.com h e f@gmail.com y
これはうまくいくかもしれません(GNU sed):
sed -i 's/\S\+/&@gmail.com/2' file