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?

[Linux][quotation mark][command] 引用符_', ", `, echo

Last updated at Posted at 2025-02-15

一覧

引用符 説明
' ''で囲まれた部分を文字列と見なす
" ""で囲まれた部分を文字列と見なす ($, `, \, "以外)
- ""で囲まれた部分が変数であれば、変数を展開する
- コマンドは実行しない
` ``で囲まれた部分をコマンドと見なす
- ``で囲まれた部分が変数であれば、変数を展開する
- コマンドは実行する
$ 変数

使用例

"

$ echo "$DATE"
$ echo $DATE

は同じ結果

"

$ echo "`date`"
$ echo `date`

は同じ結果

echoコマンド

$ echo [オプション] [文字列]
オプション 由来 説明
(default) echo - 引数が文字列の場合は、そのまま表示し、末尾に改行を追加する
- 引数が変数$の場合は、変数を展開し、末尾に改行を追加する
-n no newline - 末尾の改行を追加しない

Ping-t

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?