Visit Our UNIX and Linux User Community

Full Discussion: How to cut only letters?
Top Forums UNIX for Dummies Questions & Answers How to cut only letters? Post 302851785 by PTcharger on Monday 9th of September 2013 04:30:11 PM
Old 09-09-2013
Now that I think about it, I wasn't really clear with my question. I was hoping to cut the items into a new file. Something like cut "just letters"> newfile

It seems like the answers will all remove the letters (or in ths case, spoons, cups,etc.)and will leave just the numbers. However, I want the opposite.

---------- Post updated at 02:30 PM ---------- Previous update was at 02:25 PM ----------

Actually the full line is something like this:


I want to cut the first part (spoons, cups, forks, plates) and create a new file containing a list of those items only. I don't want to remove all the letters (just the names at the end) and since there is no space, I can't use -f -d
Test Your Knowledge in Computers #962
Difficulty: Medium
ILOVEYOU, sometimes referred to as Love Bug or Love Letter, was a computer worm that attacked tens of millions of Windows PCs on and after 5 May 2000 local time in the Philippines.
True or False?

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

transposing letters

Hi, I've written a shell function in bash that reads letters into an array, then outputs them in one column with: for n in "${array}"; do echo $n done I was wondering if anyone knew how i would transpose the letters that are output by the for loop. Right now my output is: aabbcc... (4 Replies)
Discussion started by: myscsa2004
4 Replies

2. Shell Programming and Scripting

trim letters

Hello, I have a list of words.. ranging from 4 to any characters long.. to not more than 20 though. How can I select only first seven letters of the list of words? example:- wwwwwwwwww eeeee wererreetf sdsarddrereewtewt sdsdsds sdsd ereetetttt ewtwertwrttrttrtrtwtrww I... (10 Replies)
Discussion started by: fed.linuxgossip
10 Replies

3. Shell Programming and Scripting

Need to strip few letters

Hey guys.. Can experts help me in achieving my purpose.. I have a file which contains email address of some 100 to 1000 domains, I need only the domain names.. Eg: The output should contain only ... (5 Replies)
Discussion started by: achararun
5 Replies

4. UNIX for Advanced & Expert Users

Add letters

I want to add letters A,B,C,… in front of every line of input while printing them out using PERL. eg A file is parsed as a cmd line arg and its context will be displayed as A line1... B line 2.. I tried this..but I want better and perfect solution! !perl -p my $counter; BEGIN { $counter... (4 Replies)
Discussion started by: aadi_uni
4 Replies

5. Shell Programming and Scripting

Cut Command error cut: Bad range

Hi Can anyone what I am doing wrong while using cut command. for f in *.log do logfilename=$f Log "Log file Name: $logfilename" logfile1=`basename $logfilename .log` flength=${#logfile1} Log "file length $flength" from_length=$(($flength - 15)) Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies

6. UNIX for Beginners Questions & Answers

Cut command: can't make it cut fields

I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies

7. UNIX for Beginners Questions & Answers

Random letters

Hi there, first of all this is not homework...this is a new type of exercise for practicing vocabulary with my students. I have a file consisting of two columns, separated by a tab, each line consisting of a word and its definition, separated by a line break. What i need is to replace a... (15 Replies)
Discussion started by: eldeingles
15 Replies

8. Shell Programming and Scripting

Using :<<cut / cut to comment out block of bash script

I am using : << cut / cut to comment out block of code. Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines. The "warning " is at last line of script. done < results 169 echo "END read all positioning parameters" 170... (8 Replies)
Discussion started by: annacreek
8 Replies
XCUTSEL(1)						      General Commands Manual							XCUTSEL(1)

xcutsel - interchange between cut buffer and selection SYNOPSIS
xcutsel [ -toolkitoption ...] [-selection selection] [-cutbuffer number] DESCRIPTION
The xcutsel program is used to copy the current selection into a cut buffer and to make a selection that contains the current contents of the cut buffer. It acts as a bridge between applications that don't support selections and those that do. By default, xcutsel will use the selection named PRIMARY and the cut buffer CUT_BUFFER0. Either or both of these can be overridden by com- mand line arguments or by resources. An xcutsel window has the following buttons: quit When this button is pressed, xcutsel exits. Any selections held by xcutsel are automatically released. copy PRIMARY to 0 When this button is pressed, xcutsel copies the current selection into the cut buffer. copy 0 to PRIMARY When this button is pressed, xcutsel converts the current contents of the cut buffer into the selection. The button labels reflect the selection and cutbuffer selected by command line options or through the resource database. When the ``copy 0 to PRIMARY'' button is activated, the button will remain inverted as long as xcutsel remains the owner of the selection. This serves to remind you which client owns the current selection. Note that the value of the selection remains constant; if the cutbuffer is changed, you must again activate the copy button to retrieve the new value when desired. OPTIONS
Xcutsel accepts all of the standard X Toolkit command line options as well as the following: -selection name This option specifies the name of the selection to use. The default is PRIMARY. The only supported abbreviations for this option are ``-select'', ``-sel'' and ``-s'', as the standard toolkit option ``-selectionTimeout'' has a similar name. -cutbuffer number This option specifies the cut buffer to use. The default is cut buffer 0. X DEFAULTS
This program accepts all of the standard X Toolkit resource names and classes as well as: selection (class Selection) This resource specifies the name of the selection to use. The default is PRIMARY. cutBuffer (class CutBuffer) This resource specifies the number of the cut buffer to use. The default is 0. WIDGET NAMES
The following instance names may be used when user configuration of the labels in them is desired: sel-cut (class Command) This is the ``copy SELECTION to BUFFER'' button. cut-sel (class Command) This is the ``copy BUFFER to SELECTION'' button. quit (class Command) This is the ``quit'' button. SEE ALSO
X(7), xclipboard(1), xterm(1), text widget documentation, individual client documentation for how to make a selection. BUGS
There is no way to change the name of the selection or the number of the cut buffer while the program is running. AUTHOR
Ralph R. Swick, DEC/MIT Project Athena X Version 11 xclipboard 1.1.2 XCUTSEL(1)

Featured Tech Videos

All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy