Skip to content

練習2.1.e (p.61) の ~ のクォートについての記述は誤り #50

Closed

Description

@norioxkimura

PDF 版 2022/1/1 の練習2.1.e (p.61) に「ダブルクォートによるクォートの場合、中にあるBashの変数は解釈されます。また、変数だけでなく、ホームディレクトリを表す~などの特殊な記号も解釈されます。」とありますが、ダブルクォート中では ~(や * や ?)は展開されないと思います。

$ echo ~
/home/ubuntu
$ echo "~"
~

Activity

  1. ryuichiueda commented on Aug 1, 2022

    @ryuichiueda
    Contributor

    ほんとですね・・・修正いたします。ありがとうございます!

  2. ryuichiueda commented on Aug 1, 2022

    @ryuichiueda
    Contributor

    とりあえず修正を掲示して、共著者に確認をお願いして、私は仕様をもう一度確認中です。

    https://github.com/shellgei/shellgei160/blob/master/README.md#%E7%AC%AC4%E5%88%B7%E3%81%BE%E3%81%A7

  3. norioxkimura commented on Aug 2, 2022

    @norioxkimura
    Author

    p.113 「~ などのメタ文字について、特別な意味を打ち消してそのまま使いたい場合は、次のようにバックスラッシュ「\」でエスケープするか、もしくはシングルクォート「'」でくくる必要があります。」
    → ダブルクォート " でも問題ない。「メタ文字」の $ \ などは "" 中でもエスケープが必要で、'' なら問答無用にその文字自身になるという意かな?

  4. ryuichiueda commented on Aug 4, 2022

    @ryuichiueda
    Contributor

    お、こちらもありがとうございます。修正します。

  5. ryuichiueda commented on Aug 8, 2022

    @ryuichiueda
    Contributor

    https://github.com/shellgei/shellgei160#%E7%AC%AC4%E5%88%B7%E3%81%BE%E3%81%A7
    修正入れました。ありがとうございました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions