LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Copy-paste from editor to command line (https://www.linuxquestions.org/questions/linux-newbie-8/copy-paste-from-editor-to-command-line-852022/)

Flip69 12-23-2010 09:42 AM

Copy-paste from editor to command line
 
I am trying to upgrade PHP on our linux box ( CentOS ) I copied the configure command from the phpinfo and now I want to execute that.

I am not able to copy the command from an editor in linux to the command prompt, clicking the wheel om my mouse does not work, neither does shift-insert or ctrl-shift-insert.

It does work in the editor itself.

Is there a way to do this ?

Or is there a way to execute the command in linux while it is in the file ? Like a bat file on Windows ?

markush 12-23-2010 09:46 AM

Hello Flip69,

wich editor and which terminal are you using?

Markus

bathory 12-23-2010 10:06 AM

Hi,

If you have compiled from source your current running php, then there is a config.nice executable you can copy in the new php sources directory and execute.

If not, i.e. you want to compile from sources the newer version using your distro's configure options, you can run
Code:

php -i |grep configure > build.sh
Then edit build.sh, remove "Configure Command => " and the simple quotes around ./configure and execute it from inside the php sources directory, like:
Code:

sh build.sh
Regards

Snark1994 12-24-2010 12:56 AM

I echo markush, but all virtual terminals that I have used either support right-click->paste or edit->paste (on the terminal's toolbar) - have you tried either of these?

markush 12-24-2010 03:02 AM

Well, I'm using konsole of KDE. konsole hase a menubar and I use "Edit->copy" and "Edit-Paste". I can copy text from konsole and paste it for example into the browser.

Markus

Flip69 12-24-2010 03:07 AM

@bathory

I could not find config.nice, but the commands you gave me worked fine, thanks for that, really super instructions too btw.

Running the command gave me no response though and when I try to do the make it says "No tragets speicified and no makefile found"

@everyone else

Thanks for the tips, I am using MCEDIT as editor and I am using the console in our VMWare environment, the linux distro is CentOS.

Is there a terminal program ( in windows ) that I could use, that would give me the copy paste functionallity ? I am using putty now.

markush 12-24-2010 04:16 AM

Flip69, do you mean you want to copy&paste from a host into a virtual machine?

Markus

Flip69 12-24-2010 04:20 AM

Quote:

Originally Posted by markush (Post 4201939)
Flip69, do you mean you want to copy&paste from a host into a virtual machine?

Markus

Yes, exactly, but I was succesfull doing it with Putty, any better terminal emulators out there ?

Seems installing the latest version of PHP on a CentOS is not that straightforward, I will have to use yum to do it and even that will not give me the latest version, but 5.2 will be better than PHP 5.1.6

markush 12-24-2010 04:26 AM

Why don't you share a folder on the host with your virtual machine? Then you could access the files from within your virtual machine.

Markus

Flip69 12-24-2010 04:29 AM

Quote:

Originally Posted by markush (Post 4201951)
Why don't you share a folder on the host with your virtual machine? Then you could access the files from within your virtual machine.

Markus

Sharing and transferring files is not the problem, I am not able to copy text from a linux editor to the linux command line.

markush 12-24-2010 04:36 AM

If your not using a gui, you may take a look at gpm. gpm allows for copy and paste on the console. It is a daemon, e.g. Slackware uses it as a default.
http://www.cyberciti.biz/tips/howto-...operation.html

Markus

w1k0 12-24-2010 06:37 AM

Quote:

Originally Posted by Flip69 (Post 4201887)
Thanks for the tips, I am using MCEDIT as editor and I am using the console in our VMWare environment, the linux distro is CentOS.

Is there a terminal program ( in windows ) that I could use, that would give me the copy paste functionallity ? I am using putty now.

You can copy and paste text with mcedit using the method I descibed here.

Flip69 12-24-2010 06:44 AM

Quote:

Originally Posted by w1k0 (Post 4202021)
You can copy and paste text with mcedit using the method I descibed here.

Thanks for the tip, the thing is I do not have a mouse using the console.

But I got my problem fixed another way.

repo 12-24-2010 06:45 AM

Quote:

But I got my problem fixed another way.
Perhaps you can give the solution?

Kind regards

Flip69 12-24-2010 06:51 AM

Quote:

Originally Posted by repo (Post 4202026)
Perhaps you can give the solution?

Kind regards

It was more a workaround, I used a terminal emulator to get the job done, Putty.


All times are GMT -5. The time now is 07:41 AM.