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 CENTOS
grub-render-label
GRUB-RENDER-LABEL(1) User Commands GRUB-RENDER-LABEL(1)
NAME
grub-render-label - generate a .disk_label for Apple Macs.
SYNOPSIS
grub-render-label [OPTION...] [OPTIONS]
DESCRIPTION
Render Apple .disk_label.
-b, --bgcolor=COLOR
use COLOR for background
-c, --color=COLOR
use COLOR for text
-f, --font=FILE
use FILE as font (PF2).
-i, --input=FILE
read text from FILE.
-o, --output=FILE
set output filename. Default is STDOUT
-t, --text=STRING
set the label to render
-v, --verbose
print verbose messages.
-?, --help
give this help list
--usage
give a short usage message
-V, --version
print program version
Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.
REPORTING BUGS
Report bugs to <bug-grub@gnu.org>.
SEE ALSO
The full documentation for grub-render-label is maintained as a Texinfo manual. If the info and grub-render-label programs are properly
installed at your site, the command
info grub-render-label
should give you access to the complete manual.
grub-render-label (GRUB) 2.02-2ubuntu8.3 July 2018 GRUB-RENDER-LABEL(1)