LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-17-2003, 09:42 AM   #1
lxandrthegr8
LQ Newbie
 
Registered: Aug 2003
Location: Toronto
Distribution: Mandrake
Posts: 20

Rep: Reputation: 0
cutting and pasting



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
 
Old 08-17-2003, 09:51 AM   #2
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
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
 
Old 08-17-2003, 09:56 AM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
Copy: Ctrl + Ins
Paste: Shift + Ins
 
Old 08-17-2003, 10:38 AM   #4
lxandrthegr8
LQ Newbie
 
Registered: Aug 2003
Location: Toronto
Distribution: Mandrake
Posts: 20

Original Poster
Rep: Reputation: 0
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?
 
Old 08-17-2003, 10:45 AM   #5
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
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.
 
Old 08-17-2003, 10:52 AM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
remeber to give yourslef execute permissions on the script too. Look at chmod - "man chmod"
 
Old 08-17-2003, 01:02 PM   #7
lxandrthegr8
LQ Newbie
 
Registered: Aug 2003
Location: Toronto
Distribution: Mandrake
Posts: 20

Original Poster
Rep: Reputation: 0
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?
 
Old 08-17-2003, 01:44 PM   #8
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
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
To execute the script, type:
Code:
./myScript
If you want to know for which shell your script was written, look at the first line of the script.
For example, if it is Bash, the syntax should be something like this #!/bin/bash
 
Old 08-17-2003, 02:04 PM   #9
lxandrthegr8
LQ Newbie
 
Registered: Aug 2003
Location: Toronto
Distribution: Mandrake
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks once again Mathieu
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cut and Pasting woos dotancohen Linux - Newbie 15 03-01-2005 11:27 AM
copy pasting in emacs wogga Linux - Software 7 06-16-2004 03:12 PM
automatic code pasting verve Programming 3 10-07-2002 12:08 PM
Pasting webpage into spreadsheet flaw Linux - Newbie 3 09-22-2002 07:25 PM
GAIM - Pasting Sirrvs Linux - Software 2 09-08-2002 06:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration