0

I'm trying to understand something that happened today.

Setup Win10 PC RasPi2 with wifi dongle and usb bluetooth keyboard set up as Octoprint controller.

While bouncing between working on PC and RasPi I inadvertently started typing on the wireless keyboard when I meant to be typing on PC. I cannot remember what I typed but when I turned around to look at the monitor for the RasPi, there was a warning about ~"there are 1500 entries, Continue?" I hit enter and the screen started rolling with entries. Some of the final entries were:

`````zmore
`````znew
`````zramctl
`````{
`````}

I'm just wondering what I did because when I hit the up arrow to repeat the last command all I get is the five back quotation marks and a continuation prompt if I hit enter. And since google ignores punctuation marks, I cannot search for it.

1

Pressing Tab will cause the shell to auto-complete a program name if it's the first word, or a file name elsewhere. But if you just press Tab at an empty line, the shell will offer a list of all possible program names it can find on the system.

A pair of backticks is used to specify another inline command, whose output will be inserted in that place. For example:

echo "I am `whoami`."

With five `'s, you have typed two empty backtick pairs and opened a third one. At that point you're at the beginning of the "inner" command line, so if you press Tab the shell will again offer a list of all program names.

myname=`whTab

Because you have typed an opening backtick (or quote or other balanced punctuation) but not a closing one, pressing Enter will just add another line but still keep you "inside" the backtick pair, until you finish it with another ` or cancel the input with Ctrl+C. For example:

echo "This is line 1.
This is line 2.
Line 3." > file.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.