LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2016, 08:14 PM   #1
sigint-ninja
Member
 
Registered: Feb 2011
Location: Republic Of Ireland
Distribution: Debian,Centos,Slackware
Posts: 508

Rep: Reputation: 29
cutting and pasting text on the command line


hi guys,

say i have a command line with text
$belongs here this

and i want to move this to the beginning of the line
is there an easy way to cut and paste text on the command line

i googled this and only came across the cut command
but this looks like it only works on text files etc
 
Old 03-26-2016, 10:09 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

You can use 'gpm';
Quote:
From 'man gpm';
gpm - a cut and paste utility and mouse server for virtual consoles

SYNOPSIS
gpm [ options ]

DESCRIPTION
This package tries to be a useful mouse server for applications running on the Linux console. It is based on the "selection" package, and
some of its code comes from selection itself. This package is intended as a replacement for "selection" as a cut-and-paste mechanism; it
also provides additional facilities. The "selection" package offered the first cut-and-paste implementation for Linux using two mouse but-
tons, and the cut buffer is still called "selection buffer" or just "selection" throughout this document. The information below is
extracted from the texinfo file, which is the preferred source of information.

The gpm executable is meant to act like a daemon (thus, gpmd would be a better name for it). This section is meant to describe the command-
line options for gpm, while its internals are outlined in the next section.

Due to restrictions in the ioctl(TIOCLINUX) system call, gpm must be run by the superuser. The restrictions have been added in the last 1.1
kernels to fix a security hole related to selection and screen dumping.

The server can be configured to match the user's taste, and any application using the mouse will inherit the server's attitude. From
release 1.02 up to 1.19.2 is was possible for any user logged on the system console to change the mouse feeling using the -q option. This
is no longer possible for security reasons.

As of 0.97 the server program puts itself in the background. To kill gpm you can just reinvoke it with the -k cmdline switch, although kil-
lall gpm can be a better choice.
Hope this helps.
Have fun & enjoy!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] difficulty cutting and pasting bookmarks in Firefox Brant Linux - Software 2 09-03-2014 10:16 AM
Guidance Requested: Cutting and Pasting MathType mlindeburg Programming 0 07-12-2014 02:35 PM
Questions about cutting & pasting in VirtualBox/Ubuntu? comcastuser Linux - Software 2 09-10-2010 12:07 AM
Strangeness pasting ruby code into irb command line darenw Programming 0 06-18-2009 08:45 PM
cutting and pasting lxandrthegr8 Linux - General 8 08-17-2003 02:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:27 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