A way to prevent bash from parsing command line w/out using escape symbols

后端 未结 3 1854
离开以前
离开以前 2021-01-17 06:04

I\'m looking for a way (other than \".\", \'.\', \\.) to use bash (or any other linux shell) while preventing it from parsing parts of command line. The problem seems to be

3条回答
  •  执念已碎
    2021-01-17 07:02

    Use a here-document:

    myprogramm <<'EOF'
    https://www.youtube.com/watch?v=oT3mCybbhf0
    EOF
    

    If you wrap the starting EOF in single quotes, bash won't interpret any special chars in the here-doc.

提交回复
热议问题