0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ファイルの末尾に複数行を追記

Posted at
環境

VirtualBox 7.0.20
Rocky Linux release 9.5 (Blue Onyx)
webmin 2.202

ファイルの末尾に複数行を追記したい時、わざわざファイル開くのめんどくさいですよね💦
ということでこのコマンド。

cat <<EOL >> /tmp/test.txt
あいうえお
かきくけお
さしすせそ
たちつてと
なにぬねの
EOL

最初と最後の「EOL」の文字は同じであれば何でもOK。
僕の名前である「SONKUN」でもいけます🐵

cat <<SONKUN >> /tmp/test.txt
あいうえお
かきくけお
さしすせそ
たちつてと
なにぬねの
SONKUN

「EOL」は「End Of Line(最終行)」という意味のようです😊

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?