10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all, I have a large fasta (dna sequence) file. I would like to extract a portion of the header as well as the sequence (line below the header).
Input:
Output:
All accession values (the term I want to preserve, which is the string including and directly following "GL") are different, but I... (8 Replies)
Discussion started by: pathunkathunk
8 Replies
2. Shell Programming and Scripting
Hi
Consider the file
this is a good line
when running
grep '\b(good|great|excellent)\b' file5
I expect it to match the line but it doesn't... what am i doing wrong??
(ultimately this regex will be in a awk script- just using grep to test it)
Thanks,
Storms (5 Replies)
Discussion started by: Storms
5 Replies
3. UNIX for Dummies Questions & Answers
I have a very large file (over 700 million lines) that has some lines that I need to delete. An example of 5 lines of the file:
HS4_80:8:2303:19153:193032 153 k80:138891
HS4_80:8:2105:5544:43174 89 k88:81949
165 k88:81949 323 0 * = 323 0 ... (6 Replies)
Discussion started by: pathunkathunk
6 Replies
4. Programming
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Discussion started by: jessy83
1 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to extract if the (offset>0 || flags ) from the following line:
90.30.180.90.80 > 90.121.333.308.45133: Flags , seq 14480:15928, ack 1, win 8088, options >
15:59:11.156664 IP (tos 0x0, ttl 20, id 44442, offset 0, flags , proto TCP (6), length 1500)
try:
offset.(+) ||... (7 Replies)
Discussion started by: ENG_MOHD
7 Replies
6. Shell Programming and Scripting
I trying to match the begining of the following line in a perl script with a regular expression.
$ENV{'ORACLE_HOME'}
I tried this regluar expession:
/\$ENV\{\'ORACLE_HOME\'\}/
Instead of match, I got a blank prompt >
It seems to be a problem with the single quote. If I take it... (11 Replies)
Discussion started by: JC9672
11 Replies
7. Shell Programming and Scripting
Hi,
I have a variable in my script that gets its value from a procstack output. It could be a number of any length, or it could just be a '1' with 0 or more white spaces around it. I would like to detect when this variable is just a 1 and not a 1234, for example. This is as far as I got:
... (3 Replies)
Discussion started by: tmf33uk
3 Replies
8. Shell Programming and Scripting
In Perl I can write a condition that evaluates a match expression like this:
if ($foo =~ /^bar/) {
do blah blah blah
}
How do I write this in shell? What I need to know is what operator do I use? The '=~' doesn't seem to fit. I've tried different operators, I browsed the man page for... (3 Replies)
Discussion started by: indiana_tas
3 Replies
9. Shell Programming and Scripting
Hi guys,
as per subject I am having problem with regular expressions.
Example, if i got a string "javax.servlet.http.HttpServlet.service" that may occurred anywhere within a text file.
How can I used the negate pattern matching of regular expression?
I tried the below pattern but it... (4 Replies)
Discussion started by: DrivesMeCrazy
4 Replies
10. Programming
I am trying to read a file and capture particular lines into different strings:
LENGTH: Some Content here
TEXT: Some Content Here
COMMENT: Some Content Here
I want to be able to get (LENGTH: .... ) into one array and so on... I'm trying to use PERL in slurp mode but for some reason... (8 Replies)
Discussion started by: Legend986
8 Replies