Sponsored Content
Full Discussion: Deleting a numeric sequence
Top Forums UNIX for Dummies Questions & Answers Deleting a numeric sequence Post 302752849 by sonia102 on Monday 7th of January 2013 03:52:49 PM
Old 01-07-2013
Question Deleting a numeric sequence

I have a sequence which looks like this:

Code:
>string20525 107143
AWEELWKEKEGEHRWDDEDWDWQWJKIDDDDFDEFJERIJVJFBGNJGTHGFBLMFGLNHBFJTRJRSKWSNEJDDJIWWYSYAQQHQKSKDJKTIVVKTKBVKBKBKVKFKKK
>string1870 398197
GFFTHHHHHHHYHYBSKWWOSKWSKWKSKWKSKDFVPVPVBKHKKWKQAUQAUXFVMBHNNCOCECDISIIQAIANMQNQSYYEEYTRTQQZVBNMMMSDSRTYUQOEUE
sstring18800 1181
HHHHHHRYWQA
>string1880 397224
GTGTGTGGHQQWWSS
>string18900 1175
GTGTJWQGJIMNFF
>string1890 395606
HYHEWQSSFH

I want to some how delete the 2nd value ie the 2nd tab value(the values of107143, 398197,1081 and so on..). I want it to look like this:
Code:
>string20525 
AWEELWKEKEGEHRWDDEDWDWQWJKIDDDDFDEFJERIJVJFBGNJGTHGFBLMFGLNHBFJTRJRSKWSNEJDDJIWWYSYAQQHQKSKDJKTIVVKTKBVKBKBKVKFKKK
>string1870 
GFFTHHHHHHHYHYBSKWWOSKWSKWKSKWKSKDFVPVPVBKHKKWKQAUQAUXFVMBHNNCOCECDISIIQAIANMQNQSYYEEYTRTQQZVBNMMMSDSRTYUQOEUE
>string18800
HHHHHHRYWQA
>string1880 
GTGTGTGGHQQWWSS
>string18900
GTGTJWQGJIMNFF
>string1890 
HYHEWQSSFH

is there a way i can delete the numbers following stringXXXXX ??


Moderator's Comments:
Mod Comment Please use code tags next time for your code and data.

Last edited by radoulov; 01-07-2013 at 04:58 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Checking numeric value

Hi, How can I check numeric value in shell? I am passing one parameter (integer) and I want to restrict any other characters except 0-9. ./script xyz 10 Here 2nd parameter (10) should be integer only. Can anyone help on this? Malay (6 Replies)
Discussion started by: malaymaru
6 Replies

2. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

3. Shell Programming and Scripting

Numeric Validation

Hi, How to check whether an input to a shell script contain only numeric values. Is there any way to check against the following characters. & ( ) | \ " ' < > ` I've used the following way. echo $1 | grep "\{2\}$" if then (12 Replies)
Discussion started by: sumesh.abraham
12 Replies

4. Shell Programming and Scripting

Numeric or not

Is there a simple way of determining whether a command line arguement is numeric or not?? I tried a search and didn't find anything similar... This is the 2nd time I've made this post.... It didn't appear that the first one showed up ?? Sorry if this is a duplicate... (1 Reply)
Discussion started by: harrisjl
1 Replies

5. Shell Programming and Scripting

Numeric or not?

Is there an easy way using a command or other routine for testing whether an argument on the command line is numeric? Just want to validate... I ran a search and didn't find a similar question.... Thx (3 Replies)
Discussion started by: harrisjl
3 Replies

6. UNIX for Dummies Questions & Answers

Find and Replace random numeric value with non-numeric value

Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is: 1702938475,SNU022,201004 the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies

7. Shell Programming and Scripting

How to check for a Numeric Value?

Using shell, I have a variable, how can I check that variable for a numeric value such as "41.0"? My program needs to do one things if the numeric value is found, and another if something else such as a string of letter is found. is there a specific character that denotes a numeral? The... (2 Replies)
Discussion started by: chagan02
2 Replies

8. Shell Programming and Scripting

Help with numeric manupulations

I want to calculate the following expression in script: val=179584.0 ($val *3*16384)/(1073741824) $val will have a floating value. Thanks! I tried with following: n=$(echo |awk '{ print $val*3*16384 }') n=$(echo |awk '{ v=$val; print $v*3*16384 }') expr $val \* 3.0 \*... (10 Replies)
Discussion started by: karumudi7
10 Replies

9. Shell Programming and Scripting

find common entries and match the number with long sequence and cut that sequence in output

Hi all, I have a file like this ID 3BP5L_HUMAN Reviewed; 393 AA. AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3; DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot. DT 05-JUL-2004, sequence version 1. DT 05-SEP-2012, entry version 71. FT COILED 59 140 ... (1 Reply)
Discussion started by: manigrover
1 Replies

10. UNIX for Dummies Questions & Answers

Deleting a pattern in UNIX without deleting the entire line

Hi I have a file: r58778.3|SOURCES={KEY=f665931a...,fw,221-705}|ERRORS={16_1:T,30_1:T,56_1:C,57_1:T,59_1:A,101_1:A,115:-,158_1:C,186_1:A,204:-,271_1:T,305:-,350_1:C,368_1:G,442_1:C,472_1:G,477_1:A}|SOURCE_1="Contig_1092402550638"(f665931a359e36cea0976db191ff60ff09cc816e) I want to retain... (15 Replies)
Discussion started by: Alyaa
15 Replies
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 09:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy