<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>plarail_hangout</author_name>
  <author_url>https://blog.hatena.ne.jp/plarail_hangout/</author_url>
  <blog_title>Engineering Tech Dojo</blog_title>
  <blog_url>https://tech.fun-toy-life.com/</blog_url>
  <categories>
    <anon>シェル</anon>
    <anon>コマンドライン</anon>
    <anon>Bash</anon>
  </categories>
  <description>シェルの履歴展開入門：!! や !$ で直前のコマンドを使い回す bash・zsh には「履歴展開（ヒストリ展開）」という機能があります。直前のコマンドや引数を呼び出せるため、同じ文字列を打ち直す手間が省けます。 !! はビックリマーク2つ、!$ はビックリマーク＋ドル記号です。「ビックリマークビックリマーク 使い方」「ビックリマーク シェル」「エクスクラメーション2つ シェル」で検索してたどり着いた方も同じものです。 よくある使い方 ls /var/log/nginx cat !!:$ # → cat /var/log/nginx !!:$ は「直前のコマンドの最後の引数」を意味します。ls…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.fun-toy-life.com%2Fentry%2F2026%2F06%2F05%2F230028&quot; title=&quot;シェルの履歴展開入門：!! や !$ で直前のコマンドを使い回す - Engineering Tech Dojo&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>2026-06-05 23:00:28</published>
  <title>シェルの履歴展開入門：!! や !$ で直前のコマンドを使い回す</title>
  <type>rich</type>
  <url>https://tech.fun-toy-life.com/entry/2026/06/05/230028</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
