poly to mono alphabet for every 2nd line


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers poly to mono alphabet for every 2nd line
# 1  
Old 02-18-2010
poly to mono alphabet for every 2nd line

Hi,

Can anyone teach me by using perl.

let say i have an input file that content like below:

->line_01
aaabbbDDDTTTUSSy
->line_02
cccdddEEESSSGTTT
->line_03
xxxxyyyyzzzzzzzzzz

want the above input file content to become output file like below (every 2nd line after ->... become mono alphabet):

->line_01
abDTUSy
->line_02
cdESGTTT
->line_03
xyz

Thks..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to read file line by line and compare subset of 1st line with 2nd?

Hi all, I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like: <date1>|<data1>|<url1>|<result1> <date2>|<data2>|<url2>|<result2> <date3>|<data3>|<url3>|<result3> <date4>|<data4>|<url4>|<result4> What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies

2. Shell Programming and Scripting

Conditional for every letter in alphabet

I wanted to know if there was a more efficient to do this. I was to setup a conditional for every letter of the alphabet, like so (I am parsing an array): for i in "${arr}"; do if ]; then echo "$i starts with A" else echo "$i does not start with A" fi done I want to do this A-Z, is there... (6 Replies)
Discussion started by: sudo
6 Replies

3. Shell Programming and Scripting

Recode alphabet into numbers

I have a genotype.bim file where it contains information about SNPs and genotype. As a hypothetical example, let's say genotype.bim snp1 ... A G snp2 ... G T snp3 ... G T snp4 ... G A ... snpN ... C G where first column identifies each SNP and 5th and 6th column has genotype... (3 Replies)
Discussion started by: johnkim0806
3 Replies

4. Shell Programming and Scripting

1st column,2nd column on first line 3rd,4th on second line ect...

I need to take one column of data and put it into the following format: 1st line,2nd line 3rd line,4th line 5th line,6th line ... Thanks! (6 Replies)
Discussion started by: batcho
6 Replies

5. Shell Programming and Scripting

last character is digit or alphabet!

Hello, I have to find out whether the last character is digit or alphabet. I manage to strip the last character but would need some help if there is one liner available to test the above. set x = WM echo $x | sed 's/.*\(.$\)/\1/' O/P M I would like a one liner code to test whether the... (1 Reply)
Discussion started by: dixits
1 Replies

6. Shell Programming and Scripting

Alphabet counting

I have a text file in the following format CCCCCGCCCCCCCCCCcCCCCCCCCCCCCCCC AAAATAAAAAAAAAAAaAAAAAAAAAAAAAAA TGTTTTTTTTTTTTGGtTTTTTTTTTTTTTTT TTTT-TTTTTTTTTCTtTTTTTTTTTTTTTTT Each row/line will have 32 letters and each line will only have multiple occurrences of 2 letters out of a pool... (1 Reply)
Discussion started by: Lucky Ali
1 Replies

7. UNIX for Dummies Questions & Answers

Poly character into mono character

Hi, Can anyone teach me by using perl. let say i have an input file that content like below: ->line_01 aaabbbDDDTTTUSSy ->line_02 cccdddEEESSSGTTT ->line_03 xxxxyyyyzzzzzzzzzz want the above input file content to become output file like below (every 2nd line after ->... become mono... (7 Replies)
Discussion started by: eisya10
7 Replies

8. Linux

Mono Project!

Hello, Does anyone know about MONO PROJECT? It supports .NET on linux! I have downloaded its packages and installed it. But I don't know how to start it!!! Where can I find installed programs?! (5 Replies)
Discussion started by: HSN
5 Replies

9. Shell Programming and Scripting

Get the line count from 2nd line of the file ?

Hi, I want to get the line count of the file from the 2nd line of the file ? The first line is header so want to skip that. Thanks. (8 Replies)
Discussion started by: smc3
8 Replies

10. Shell Programming and Scripting

What can i do to check that the input is all alphabet.. ?

What can i do to check that the input is all alphabet.. ? (4 Replies)
Discussion started by: XXXXXXXXXX
4 Replies
Login or Register to Ask a Question
XScreenSaver(1) 					      General Commands Manual						   XScreenSaver(1)

NAME
qix - bounce colored lines around a window SYNOPSIS
qix [-display host:display.screen] [-foreground color] [-background color] [-window] [-root] [-mono] [-install] [-visual visual] [-segments int] [-spread pixels] [-size pixels] [-count int] [-color-shift degrees] [-delay usecs] [-random] [-linear] [-solid] [-hollow] [-xor] [-no-xor] [-transparent] [-non-transparent] [-additive] [-subtractive] [-poly int] [-gravity] [-no-gravity] DESCRIPTION
The qix program bounces a series of line segments around its window. This is truly the swiss army chainsaw of qix programs. If you know of one with more display modes, I want to know about it. OPTIONS
qix accepts the following options: -window Draw on a newly-created window. This is the default. -root Draw on the root window. -mono If on a color display, pretend we're on a monochrome display. -install Install a private colormap for the window. -visual visual Specify which visual to use. Legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual. -segments integer How many line segments should be drawn. Default 50. -spread integer How far apart the endpoints of one segment should be from the next. Default 8. -size integer The maximum distance one endpoint of a segment is allowed to be from the opposite end of that segment. Default 0, meaning unlim- ited. -count integer How many qixes to draw. Default 1. -color-shift degrees If on a color display, the color of the line segments will cycle through the spectrum. This specifies how far the hue of each seg- ment should be from the next, in degrees on the HSV wheel. Default 3. -delay microseconds How much of a delay should be introduced between steps of the animation. Default 25000, or about 0.025 seconds. -random The qix will wander around the screen semi-randomly. This is the default. -linear The opposite of -random: the qix will travel in straight lines until it reaches a wall, and then it will bounce. -solid If this is specified, then the area between the line segments will be filled in with the appropriate color, instead of the qix sim- ply being composed of one-pixel-wide line segments. This option looks really good in color. -hollow The opposite of -solid; this is the default. -xor If this is specified, then qix segments will be drawn and erased with xor, instead of being drawn in some color and erased in the background color. This implies -mono, in that only two colors can be used. -transparent If this is specified, and -count is greater than 1, then each qix will be drawn in one color, and when they overlap, the colors will be mixed. This looks best in conjuction with -solid. -non-transparent Turns off -transparent. -additive If -transparent is specified, then this option means that the colors will be mixed using an additive color model, as if the qixes were projected light. This is the default. -subtractive If -transparent is specified, then this option means that the colors will be mixed using a subtractive color model, as if the qixes were translucent filters. -poly int How many vertices each qix-line should have: the default is 2, meaning the traditional qix line shape. Three will yield triangles, and so on. -gravity -no-gravity Whether there should be downward attraction. For example, the options -gravity -linear will make everything move in nice smooth parabolas. Gravity is off by default. ENVIRONMENT
DISPLAY to get the default host and display number. XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property. SEE ALSO
X(1), xscreensaver(1) COPYRIGHT
Copyright (C) 1992 by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. AUTHOR
Jamie Zawinski <jwz@jwz.org>, 13-aug-92. Thanks to Ariel Scolnicov for the -poly and -gravity options. X Version 11 27-Apr-97 XScreenSaver(1)