How do I paste in the terminal


#1

Tried to paste my github repo address with ctrl+v, but it does not work.


#2

So far i know it is impossible to paste into the command line at codecademy, not the answer you would like to hear, i can understand


#3

Right click->paste
You can also upload a text file and download it.

Locally:

$ echo blah blah some text > my_file 
$ curl -F 'clbin=<-' https://clbin.com < my_file 
https://clbin.com/F5WIJ

(Just use any pastebin and get the link to the raw file)

and then download it on the other machine:

$ curl https://clbin.com/F5WIJ > my_file
$ cat my_file
blah blah some text

And if you were to want to run lines as commands, then you could enumerate the lines:

$ cat -n my_file
     1	blah blah some text

Then, you might want to pick a specific line (1):

$ sed -n 1p my_file
blah blah some text

And execute the result:

$ `sed -n 1p my_file`
-bash: blah: command not found

.. blah indeed is not a command.. but had it been something that it could run, it would have. It tried, you can tell it searched for the command "blah"


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.