Score:0

how to copy the output of a command to nano editor

in flag

I am following a guide to setup wordpress, one of the steps instructs to copy the values of https://api.wordpress.org/secret-key/1.1/salt/ to a section in wp-config.php. I can connect via PuTTY only remotely to this server and I am using the nano editor. The question is how to do this without typing each individual character into the wp-config.

On an MS-DOS Windows console you can mark the text and then copy it. PuTTY has the option to copy everything to clipboard, but Ctrl+U (paste) does not work, saying “cut buffer is empty”.

muru avatar
us flag
Why not use wget or curl to just download the content straight into the file?
in flag
this is the command (curl -s https://api.wordpress.org/secret-key/1.1/salt/) I can see the output as they say in the tutorial but the next step is to copy it to the wp-config that I do not how how to do it, I open nano but nothing can be pasted to nano editor with sudo access.
muru avatar
us flag
`curl -s https://api.wordpress.org/secret-key/1.1/salt >> wp-config.php` and then edit it to move around the salt as needed
Score:0
in flag

The Ctrl+U shortcut is to paste text that was copied (or cut) from within nano. You will want to use one of these:

  1. Ctrl+Shift+V
  2. Shift+Insert

That’ll do what you’re looking for

in flag
thank very much, 'Shift + Insert' worked.
in flag
What’s a mouse? Haven’t used one in 15+ years
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.