cutting and pasting
:newbie:
This is definitely a newbie question. How can you make it easier to cut and paste using the "How to" to actually paste them into the terminals. Sorry for such a simple question but I've tried to do it several different ways. Some programs will let you cut and paste into them, others will not. Thanks in advance |
If you are using a mouse with 3 buttons. You simply have to select the text to copy(ya, only select it and nothing else), click the middle button to paste. If you are using a 2-button mouse, try clicking on both buttons at the same time. If this doesn't work you will have to set emulate-3-button-mouse in your X config file. Try to do a search on it.
Hope you have a 3 buttons mouse :) |
Copy: Ctrl + Ins
Paste: Shift + Ins |
No that is not what I'm asking. I want to know how to paste a script found in the "How to..." text into the terminal window. When I attempt to do so each line will be run thereby giving me error messages. I want to load the entire script to run. Am I missing something here?
|
Copy the text into a text editor and then save it as a file.
If you are getting errors, the script was most likely written for another shell. By default, most Linux distribution use the Bash shell. |
remeber to give yourslef execute permissions on the script too. Look at chmod - "man chmod"
|
Thanks again Mathieu, but now - how do I paste that file into the terminal window? If it is the Bash shell, what are the major differences?
|
You need to make the file executable.
In the terminal, go in the directory where you saved the file. You can use the cd command to change directory and the ls command to list the contents of a directory. When you are in the directory with the file, use chmod to set the permissions to executable. Code:
chmod 755 myScript Code:
./myScript For example, if it is Bash, the syntax should be something like this #!/bin/bash |
Thanks once again Mathieu
|
All times are GMT -5. The time now is 03:23 PM. |