Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Copy a command string from the command line Post 302355511 by Michael Safyan on Wednesday 23rd of September 2009 12:00:42 AM
Old 09-23-2009
This is specific to your terminal emulator. If you are using the Gnome Terminal Emulator, you can use SHIFT+CTRL+C to copy and SHIFT+CTRL+V to paste.

EDIT: As noted above, if you are simply trying to repeat a command, hitting the up arrow key is the best method of doing this.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to? launch command with string of command line options

my description from another thread... here's my code: #!/bin/bash IFS=$'\n' function OutputName() { input=$1 echo $input input=`echo "$input" | sed -e 's/.//'` input=`echo "$input".avi` output_name=$input } if ]; then echo... (5 Replies)
Discussion started by: TinCanFury
5 Replies

2. UNIX for Advanced & Expert Users

Command to display nth line before the string is matched.

All, Is there any way out to display the nth line before the string is matched ??? Eg : If i have a file which has the following contents and if i want to get the 3rd line before the string is matched a b c d e f if i give the input as f and lines before the match as 3 then it should... (5 Replies)
Discussion started by: helper
5 Replies

3. Shell Programming and Scripting

Remove Command-Line Option from String

I want to add a "-r <remote_host>" option to my ksh script, causing the script to run a script of the same name on the specified remote host. The remote invocation should itself include all the command-line options of the original invocation, less the -r option. For example, this invocation: ... (7 Replies)
Discussion started by: mattmiller
7 Replies

4. Shell Programming and Scripting

On the command line using bash, how do you split a string by column?

Input: MD5(secret.txt)= fe66cbf9d929934b09cc7e8be890522e MD5(secret2.txt)= asd123qwlkjgre5ug8je7hlt488dkr0p I want the results to look like these, respectively: MD5(secret.txt)= fe66cbf9 d929934b 09cc7e8b e890522e MD5(secret2.txt)= asd123qw lkjgre5u g8je7hlt 488dkr0p Basically, keeping... (11 Replies)
Discussion started by: teiji
11 Replies

5. Shell Programming and Scripting

Command output string manipulation possible in one line?

This has been bothering me for 3 days. $> hostname cepsun64amd And I just want "cepsun", I would normally do h=`hostname`; ${h%%64*} But I am looking for a one-liner just for my own knowledge, because if there is a way to do this, I should know it by now. Anyway, so is this... (2 Replies)
Discussion started by: Ryan.
2 Replies

6. Shell Programming and Scripting

Removing command line arguments from string list

I am passing a list of strings $list and want to remove all entries with --shift=number, --sort=number/number/..., --group=number/number/... Also are removed whether upper or lower case letters are used For example the following will all be deleted from the list --shift=12 --shift=2324... (7 Replies)
Discussion started by: kristinu
7 Replies

7. Shell Programming and Scripting

Can a string be a command line argument?

I would like to use a string as a command line argument...is this possible using TCSH? For example say my script is called TEST and I would like to pass a string into my script stating why the test failed. EXAMPLE: TEST "Failed due to missing statement" (4 Replies)
Discussion started by: thibodc
4 Replies

8. Shell Programming and Scripting

delete the line with a particular string in a file using sed command.

Hello, I want to delete all lines with given string in file1 and the string val is dynamic. Can this be done using sed command. Sample: vars="test twinning yellow" for i in $vars do grep $i file1 if then echo "Do Nothing" else sed `/$i/d` file1 fi done Using the above... (5 Replies)
Discussion started by: PrasadAruna
5 Replies

9. Shell Programming and Scripting

Bash Command to Get Nth Line in a String?

hi i need to get the 3rd line in a string. actually, not sure if it's a string, list, array, or something else. I'm using grep to retrieve all the numbers in a string-- in the console, it displays as multiple lines: $ echo "Sink 0: reference = 0: 153% 1: 45%, real = 0: 62%" | grep -o * 0... (4 Replies)
Discussion started by: johnywhy
4 Replies
QKeySequence(3qt)														 QKeySequence(3qt)

NAME
QKeySequence - Encapsulates a key sequence as used by accelerators SYNOPSIS
#include <qkeysequence.h> Inherits Qt. Public Members QKeySequence () QKeySequence ( const QString & key ) QKeySequence ( int key ) QKeySequence ( int k1, int k2, int k3 = 0, int k4 = 0 ) QKeySequence ( const QKeySequence & keysequence ) ~QKeySequence () uint count () const bool isEmpty () const Qt::SequenceMatch matches ( const QKeySequence & seq ) const operator QString () const operator int () const (obsolete) int operator[] ( uint index ) const QKeySequence & operator= ( const QKeySequence & keysequence ) bool operator== ( const QKeySequence & keysequence ) const bool operator!= ( const QKeySequence & keysequence ) const RELATED FUNCTION DOCUMENTATION
QDataStream & operator<< ( QDataStream & s, const QKeySequence & keysequence ) QDataStream & operator>> ( QDataStream & s, QKeySequence & keysequence ) DESCRIPTION
The QKeySequence class encapsulates a key sequence as used by accelerators. A key sequence consists of up to four keyboard codes, each optionally combined with modifiers, e.g. SHIFT, CTRL, ALT, META, or UNICODE_ACCEL. For example, CTRL + Key_P might be a sequence used as a shortcut for printing a document. The key codes are listed in qnamespace.h. As an alternative, use UNICODE_ACCEL with the unicode code point of the character. For example, UNICODE_ACCEL + 'A' gives the same key sequence as Key_A. Key sequences can be constructed either from an integer key code, or from a human readable translatable string such as" Ctrl+X,Alt+Space". A key sequence can be cast to a QString to obtain a human readable translated version of the sequence. Translations are done in the "QAccel" context. See also QAccel and Miscellaneous Classes. MEMBER FUNCTION DOCUMENTATION
QKeySequence::QKeySequence () Constructs an empty key sequence. QKeySequence::QKeySequence ( const QString & key ) Creates a key sequence from the string key. For example" Ctrl+O" gives CTRL+UNICODE_ACCEL+'O'. The strings "Ctrl"," Shift", "Alt" and "Meta" are recognized, as well as their translated equivalents in the "QAccel" context (using QObject::tr()). Multiple key codes (up to four) may be entered by separating them with commas, e.g. "Alt+X,Ctrl+S,Q". This contructor is typically used with tr(), so that accelerator keys can be replaced in translations: QPopupMenu *file = new QPopupMenu( this ); file->insertItem( tr("&Open..."), this, SLOT(open()), QKeySequence( tr("Ctrl+O", "File|Open") ) ); Note the "File|Open" translator comment. It is by no means necessary, but it provides some context for the human translator. QKeySequence::QKeySequence ( int key ) Constructs a key sequence that has a single key. The key codes are listed in qnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL. QKeySequence::QKeySequence ( int k1, int k2, int k3 = 0, int k4 = 0 ) Constructs a key sequence with up to 4 keys k1, k2, k3 and k4. The key codes are listed in qnamespace.h and can be combined with modifiers, e.g. with SHIFT, CTRL, ALT, META or UNICODE_ACCEL. QKeySequence::QKeySequence ( const QKeySequence & keysequence ) Copy constructor. Makes a copy of keysequence. QKeySequence::~QKeySequence () Destroys the key sequence. uint QKeySequence::count () const Returns the number of keys in the key sequence. The maximum is 4. bool QKeySequence::isEmpty () const Returns TRUE if the key sequence is empty; otherwise returns FALSE. Qt::SequenceMatch QKeySequence::matches ( const QKeySequence & seq ) const Matches the sequence with seq. Returns Qt::Identical if successful, Qt::PartialMatch for matching but incomplete seq, and Qt::NoMatch if the sequences have nothing in common. Returns Qt::NoMatch if seq is shorter. QKeySequence::operator QString () const Creates an accelerator string for the key sequence. For instance CTRL+Key_O gives "Ctrl+O". If the key sequence has multiple key codes they are returned comma-separated, e.g." Alt+X, Ctrl+Y, Z". The strings, "Ctrl", "Shift", etc. are translated (using QObject::tr()) in the "QAccel" scope. If the key sequence has no keys, QString::null is returned. On Mac OS X, the string returned resembles the sequence that is shown in the menubar. QKeySequence::operator int () const This function is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. For backward compatibility: returns the first keycode as integer. If the key sequence is empty, 0 is returned. bool QKeySequence::operator!= ( const QKeySequence & keysequence ) const Returns TRUE if keysequence is not equal to this key sequence; otherwise returns FALSE. QKeySequence &; QKeySequence::operator= ( const QKeySequence & keysequence ) Assignment operator. Assigns keysequence to this object. bool QKeySequence::operator== ( const QKeySequence & keysequence ) const Returns TRUE if keysequence is equal to this key sequence; otherwise returns FALSE. int QKeySequence::operator[] ( uint index ) const Returns a reference to the element at position index in the key sequence. This can only be used to read an element. RELATED FUNCTION DOCUMENTATION
QDataStream &; operator<< ( QDataStream & s, const QKeySequence & keysequence ) Writes the key sequence keysequence to the stream s. See also Format of the QDataStream operators. QDataStream &; operator>> ( QDataStream & s, QKeySequence & keysequence ) Reads a key sequence from the stream s into the key sequence keysequence. See also Format of the QDataStream operators. SEE ALSO
http://doc.trolltech.com/qkeysequence.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qkeysequence.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QKeySequence(3qt)
All times are GMT -4. The time now is 07:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy