<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>eel3</author_name>
  <author_url>https://blog.hatena.ne.jp/eel3/</author_url>
  <blog_title>新・日々録 by TRASH BOX@Eel</blog_title>
  <blog_url>https://eel3.hatenablog.com/</blog_url>
  <categories>
    <anon>小ネタプログラミング</anon>
    <anon>Ruby</anon>
    <anon>gawk</anon>
    <anon>Gauche</anon>
  </categories>
  <description>空の行（改行のみの行）が数十行あるだけのテキストファイルが急に欲しくなったので、Rubyで作ってみた。 ruby -e '30.times { print &quot;\n&quot; }' &gt; test3.txt 見た目通り、何の捻りもない。後でこんな書き方もあることに気づいた。 ruby -e 'print &quot;\n&quot; * 30' &gt; test3.txt 改行30文字分の文字列を生成しているけど、効率的にどうなんだろう？ 改行を1文字ずつ30回標準出力に書き込むのと、文字列を生成してから1回だけ書き込むのと。いや、最適化されるかもしれないから、一概には言えないのか。インタプリタ内部の挙動を全く知らないので判断で…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Feel3.hatenablog.com%2Fentry%2F20100516%2F1274005376&quot; title=&quot;改行のみのテキストファイルを作る - 新・日々録 by TRASH BOX@Eel&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-05-16 19:22:56</published>
  <title>改行のみのテキストファイルを作る</title>
  <type>rich</type>
  <url>https://eel3.hatenablog.com/entry/20100516/1274005376</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
