Concatenate lines between lines starting with a specific pattern
Hi,
I have a file such as:
---
>contig00001 length=35524 numreads=2944
gACGCCGCGCGCCGCGGCCAGGGCTGGCCCA
CAGGCCGCGCGGCGTCGGCTGGCTGAG
>contig00002 length=4242 numreads=43423
ATGCCGAAGGTCCGCCTGGGGCTGG
CGCCGGGAGCATGTAGCG
---
I would like to concatenate the lines not starting with ">" (concatenate any lines between lines starting with ">"). My wanted output is:
---
>contig00001 length=35524 numreads=2944
gACGCCGCGCGCCGCGGCCAGGGCTGGCCCACAGGCCGCGCGGCGTCGGCTGGCTGAG
>contig00002 length=4242 numreads=43423
ATGCCGAAGGTCCGCCTGGGGCTGGCGCCGGGAGCATGTAGCG
---
Thanks
---------- Post updated at 01:54 PM ---------- Previous update was at 01:48 PM ----------
I have tried like this:
% awk '{if(substr($0,1)==">") print $0"\n";else printf("%s",$0);}' test2.fna | fold -w60
But my output looks like:
Instead of what I want which is like this:
hi,,
i hav a file with many lines.i need to remove all lines before a line begginning with a specific pattern from the file because these lines are not required.
Can u help me out with either a perl script or shell script
example:-
if file initially contains lines:
a
b
c
d
.1.2
d
e
f... (2 Replies)
i have a file sample.txt containing
i want to delete lines starting with 123 neglecting spaces and tabs.
but not lines containing 123. i.e.
i want files sample.txt as
help me
thanxx (4 Replies)
Hi, just tried some script, awk, sed for the last 2 hours and now need help.
Let's say I have a huge file of 800,000 lines like this :
It's a tedious job to look through it, I'd like to remove those useless lines in it as there's a few thousands :
Or to be even more precise :
if line1 =... (6 Replies)
Input:
09:43:46,538 INFO first text
10:45:46,538 INFO second
text
11:00:46,538 INFO third
more
text
Output:
09:43:46,538 INFO first text
10:45:46,538 INFO second text
11:00:46,538 INFO third more text
The rule is to append all lines so each line contains this format... (7 Replies)
I have a file that looks like this:
John Smith
http://www.profile1.com
http://www.profile2.com
http://www.profile3.com
Marc Olsen
http://www.profile4.com
http://www.profile5.com
http://www.profile6.com
http://www.profile7.com
Lynne Doe
http://www.profile8.com
http://www.profile9.com... (3 Replies)
How to concatenate lines with specific pattern?
I have data dumped from a table into text file. In some occurrence the data row is split into two rows.
Example:
12345678|Global Test|Global Test Task|My Request|Date|Date|Date|1|1|
12345679|Global Test2|Global Test Task2|My... (8 Replies)
Hi ,
I want to insert data into a new file after grepping specific pattern . for more info please read following
for example:
abc=12345678902222
def=45678904444
-------
-------
INAVLID ABC
I want to "INAVLID ABC" grep above pattern from multiple files and want to write abc value and ... (3 Replies)
Hi,
I need to delete all lines in the file using vi editor which start with word aternqaco.
Please assist.
aternqaco.__oracle_base='/amdbqa01/app/oracle'#ORACLE_BASE set from environment
aternqa.__oracle_base='/amdbqa01/app/oracle'#ORACLE_BASE set from environment... (3 Replies)
Dear all,
I would like to delete even lines starting with "N" together with their respective titles which are actually odd lines.
Below is the example of input file. I would like to remove line 8 and 12 together with its title line, i.e., line 7 and 11, respectively.... (2 Replies)
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
8 Replies
LEARN ABOUT HPUX
xsetdashes
XSetDashes() XSetDashes()
Name
XSetDashes - set a pattern of line dashes in a graphics context.
Synopsis
XSetDashes(display, gc, dash_offset, dash_list, n)
Display *display;
GC gc;
int dash_offset;
char dash_list[];
int n;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
gc Specifies the graphics context.
dash_offset
Specifies the phase of the pattern for the dashed line style.
dash_list Specifies the dash list for the dashed line style. An odd-length list is equivalent to the same list concatenated with itself to
produce an even-length list.
n Specifies the length of the dash list argument.
Description
XSetDashes() sets the dashes component of a GC. The initial and alternating elements of the dash_list argument are the dashes, the others
are the gaps. All of the elements must be non-zero, with lengths measured in pixels. The dash_offset argument defines the phase of the
pattern, specifying how many pixels into the dash_list the pattern should actually begin in the line drawn by the request.
n specifies the length of dash_list. An odd value for n is interpreted as specifying the dash_list concatenated with itself to produce
twice as long a list.
Ideally, a dash length is measured along the slope of the line, but server implementors are only required to match this ideal for horizon-
tal and vertical lines. Failing the ideal semantics, it is suggested that the length be measured along the major axis of the line. The
major axis is defined as the x axis for lines drawn at an angle of between -45 and +45 degrees or between 315 and 225 degrees from the x
axis. For all other lines, the major axis is the y axis.
See Volume One, Chapter 5, The Graphics Context, for further information.
Errors
BadAlloc
BadGC
BadValue No values in dash_list.
Element in dash_list is 0.
See Also
XDefaultGC(), XChangeGC(), XCopyGC(), XCreateGC(), XFreeGC(), XGContextFromGC(), XSetArcMode(), XSetBackground(), XSetClipMask(), XSetCli-
pOrigin(), XSetClipRectangles(), XSetFillRule(), XSetFillStyle(), XSetForeground(), XSetFunction(), XSetGraphicsExposures(), XSetLineAt-
tributes(), XSetPlaneMask(), XSetState(), XSetStipple(), XSetSubwindowMode(), XSetTSOrigin().
Xlib - Graphics Context XSetDashes()