10-28-2011
Remove 1st character in periodic lines
Hi,
I have a file that looks like this, the unity of information is composed of four lines, and these extends for millions.
Quote:
@853_103_1883
TCACTACTACGACACTACTTCTGTCGACTCCTGTATAGTAG
+
78/)3*=//+9=*(<6@,73&8&*&/5&4%,7%0%.
7&
@853_106_929
TCACTACTTGCTTGTTTTCGCTCCCCTTCCATGCTGCTGCG
+
9<(1/37=)6;?7,49>37'57:3388+7&.55705;<7*
@853_108_1709
TCACTACGAAGCTTTGGCCTTCAACGCCTCCATGCTGCTGC
+
<345=+;7<5&8=A>4>;9=16A=0%>87:3<?:<,@8==
@853_112_748
TCACTACCTGTCGCACCAGCGGCGCGATAATCGTATGCCGT
+
A;.85>8',);9%->;34.<@@0'@4%<0)>?::?%94:+
My objective is to remove the highligthed
"T".
Quote:
@853_103_1883
CACTACTACGACACTACTTCTGTCGACTCCTGTATAGTAG
+
78/)3*=//+9=*(<6@,73&8&*&/5&4%,7%0%.
7&
@853_106_929
CACTACTTGCTTGTTTTCGCTCCCCTTCCATGCTGCTGCG
+
9<(1/37=)6;?7,49>37'57:3388+7&.55705;<7*
@853_108_1709
CACTACGAAGCTTTGGCCTTCAACGCCTCCATGCTGCTGC
+
<345=+;7<5&8=A>4>;9=16A=0%>87:3<?:<,@8==
@853_112_748
CACTACCTGTCGCACCAGCGGCGCGATAATCGTATGCCGT
+
A;.85>8',);9%->;34.<@@0'@4%<0)>?::?%94:+
How to attack this? This character is always constant in type "T" and position "1st" but the rest of the line is variable. The positons of the lines are periodics of every 2nd, 6st, 10th... lines, and upstream and downstream lines always start with "@" and "+". The fourth line might contain a "T" in the 1st position which I don't want to remove
Iknow the basics of unix commands.
Cheers!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file with a few thousand lines and I'd like to remove all the lines that have more than 1 asterik (the * character) in it. So if it has 2 or more in a single line, I'd like the line removed (double d command in vi) (12 Replies)
Discussion started by: guitarscn
12 Replies
2. UNIX for Advanced & Expert Users
I have a '~' delimited file of 6 - 7 million rows. Each row should contain 13 columns delimited by 12 ~'s. Where there are 13 tildes, the row needs to be removed. Each row contains alphanumeric data and occasionally a ~ ends up in a descriptive field and therefore acts as a delimiter, resulting... (7 Replies)
Discussion started by: kpd
7 Replies
3. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
4. UNIX for Advanced & Expert Users
Hi.
I have a huge file (350 million lines).
I need to delete all lines in it that:
1. Begin with a pipe character -- '|'
2. Or have less than 5 pipe characters in the line
Have been searching for some SED/AWK help for this (which is faster btw on such a ginormous file?) but only... (7 Replies)
Discussion started by: pkiula
7 Replies
5. Shell Programming and Scripting
Hi, I have one file, I need to check if file exist or not and then remove the lines which starts with ?
My file1.out data is some thing
abcabcppp
xyzxyzpqr
?????????
?????????
Output should be in test.out
abcabcppp
xyzxyzpqr
I am getting the output as below but the File does not exist... (4 Replies)
Discussion started by: Ramyajiguru1
4 Replies
6. Shell Programming and Scripting
I want to remove commands having no output. In below text file.
bash-3.2$ cat abc_do_it.txt
grpg10so>show trunk group all status
grpg11so>show trunk group all status
grpg12so>show trunk group all status
GCPKNYAIGT73IMO 1440 1345 0 0 94 0 0 INSERVICE 93% 0%... (4 Replies)
Discussion started by: Raza Ali
4 Replies
7. Shell Programming and Scripting
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
8. Shell Programming and Scripting
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
9. UNIX for Beginners Questions & Answers
I have a file of a content like this:
abc_bla -def 800
abc_bla -def 802
abc_bla -def 804
abc_bla -def 806
abc_bla -def 808
abc_bla -def 810
abc_bla -def 812
abc_bla -def 814
...
abc_bla -def 898
abc_bla -def 900
abc_bla -def 902
abc_bla -def 904
...
abc_bla -def 990
abc_bla -def... (7 Replies)
Discussion started by: maya3
7 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I came across one issue recently where output from one of the columns of the table from where i am creating input file has newline characters hence, record in the file is spread over multiple lines. Fields in the file are separated by pipe (|) delimiter. As header will never have newline... (4 Replies)
Discussion started by: Prathmesh
4 Replies
LEARN ABOUT DEBIAN
gchem3d
GCHEM3D(1) gnome-chemistry-utils GCHEM3D(1)
NAME
gchem3d - a small chemical viewer application
SYNOPSIS
gchem3d [OPTION(S)...] [FILE...]
DESCRIPTION
gchem3d is a small chemical viewer application, which can show several chemical file formats.
OPTIONS
The following options are accepted:
-b COLOR, --bgcolor=COLOR
Use the given color as background color. COLOR can be one of "black" (default), "white", "#rrggbb" (don't forget to escape the "#"
character in the shell).
-d MODEL, --display3d=MODEL
Choose how molecules are displayed. MODEL can be one of "BallnStick" (default), "SpaceFill".
-?, --help
Show application help options.
--help-all, --help-*
Print all or just a group of help options. These options are not documented here. Instead see gtk-options(7) and gnome-options(7).
-v, --version
Print gchem3d version information.
SEE ALSO
gnome-options(7), gtk-options(7)
AUTHORS
Jean Brefort <jean.brefort@normalesup.org>
Program author.
Daniel Leidert <daniel.leidert@wgdd.de>
Manpage author.
COPYRIGHT
Copyright (C) 2002-2007 Jean Brefort
Copyright (C) 2004-2007 Daniel Leidert
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any
later version published by the Free Software Foundation.
gcu 0.12 $Date: 2009-03-19 10:53:47 +0100 (jeu. 19 mars 2009) $ GCHEM3D(1)