0

the screenshot I mentionedSo I was experimenting with the terminal in Wsl and happened to enter something that started with "can't" (I don't remember what it was). After that, I entered some sort of note-taking tool or program to execute multiple commands at once.

As you can see, I'm pretty new to Linux and confused as to what "can't" actually does.

I'll add a screenshot in case my explanation confuses you.

Hossein Mousavi
  • 183
  • 1
  • 11
UDONTO
  • 47
  • 2
  • 6
  • 1
    `Can't` doesn't do anything, probably you wrote up a [heredoc](https://tldp.org/LDP/abs/html/here-docs.html). – Liso Jan 26 '22 at 08:30

1 Answers1

0

Bash triggers on can't because of single alone quote inside.

So you entered a single quote ('), say opening quote, the first.
Bash waits for the second one and shows > as temporary prompt to remind you.

Compare the following:

$ x='y
> '
$

with

$ x='y'
$

The same will happen with double quotes.


To understand BASH you have to read the docs like https://tldp.org/LDP/Bash-Beginners-Guide/html/index.html .

N0rbert
  • 97,162
  • 34
  • 239
  • 423