{
  "$type": "site.standard.document",
  "canonicalUrl": "https://rednafi.com/misc/use-curly-braces-while-pasting-shell-commands/",
  "description": "Prevent shell commands from executing immediately when pasting. Use curly braces to safely paste multi-line commands with hidden newline characters.",
  "path": "/misc/use-curly-braces-while-pasting-shell-commands/",
  "publishedAt": "2021-11-08T00:00:00.000Z",
  "site": "at://did:plc:fgtm2c26vfcj74rfmeggbyqj/site.standard.publication/3mnl6f7ob462z",
  "tags": [
    "Shell",
    "Unix",
    "TIL"
  ],
  "textContent": "Pasting shell commands can be a pain when they include hidden return \\n characters. In\nsuch a case, your shell will try to execute the command immediately. To prevent that, use\ncurly braces { <cmd> } while pasting the command. Your command should look like the\nfollowing:\n\nHere, the spaces after the braces are significant.",
  "title": "Use curly braces while pasting shell commands"
}