11-23-2013
Admitting that Don Cragun's proposal is by far better/more efficient, there's no reason your sequence of pipes should not work. If you are not happy with its performance, post input and output and tell us what you dislike.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm having problems since few days ago, and i'm not able to make it works with a simple awk+grep script (or other way to do this).
For example, i have a input file1.txt:
cat inputfile1.txt
218299910417
1172051195
1172070231
1172073514
1183135117
1183135118
1183135119
1281440202
... (3 Replies)
Discussion started by: poliver
3 Replies
2. Shell Programming and Scripting
Hi,
I have a sql file that runs something like this
vi Test.sql
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM PUBLIC;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM DEMO_READ;
REVOKE SELECT ON DEMO_USER.DEMO_NOMINEE_TEST FROM DEMO_READ;
REVOKE EXECUTE ON DEMO_USER.SQC_SAMP FROM... (3 Replies)
Discussion started by: rajan_san
3 Replies
3. Shell Programming and Scripting
Hi!
I have a strange behaviour from sed and awk, but I'm not sure, if I'm doing something wrong:
I have a list of words, where I want to add the following string at the end of each line:
\;\;\;\;0\;1
I try like this:
$ cat myfile | awk '{if ( $0 != "" ) print $0"\;\;\;\;0\;1"}'
Result:... (5 Replies)
Discussion started by: regisl67
5 Replies
4. Shell Programming and Scripting
Korn Shell in AIX 6.1
I want to print the below shown pipe (|) separated list line by line.
line=es349889|nhb882309|ts00293|snh03524|bg578835|bg37900|rnh00297|py882201|sg175883
for i in line
do
echo "Hello $line "
done
I wanted to execute the above for loop. But i can't even set the... (3 Replies)
Discussion started by: polavan
3 Replies
5. UNIX for Dummies Questions & Answers
hey
i m kinda new to this so i will appreciate any help
, i have this list of values:
pwwn = 0x50012482009cd7a7 nwwn=0x50012482009cd7a6 port_id = 0x280200
pwwn = 0x5001248201bcd7a7 nwwn=0x5001248201bcd7a6 port_id = 0x280300
pwwn = 0x50012482009c51ad nwwn=0x50012482009c51ac port_id =... (4 Replies)
Discussion started by: boaz733
4 Replies
6. Shell Programming and Scripting
Hi,
I need a help to search a pattern and print the multiple lines between them.
Input file:
Tue May 29 12:30:33 EDT 2012:threadWebContainer : 357:com.travimp.hotelierlinks.abba.service.RequestHandler.requestService(String, ITICSDataSet): hotelCancelReservation request: ... (4 Replies)
Discussion started by: aroragaurav.84
4 Replies
7. Shell Programming and Scripting
Hello,
I can extract lines in a file, between two strings but only one time.
If there are multiple occurencies, my command show only one block.
Example, monfichier.txt contains :
debut_sect
texte L1
texte L2
texte L3
texte L4
fin_sect
donnees inutiles 1
donnees inutiles 2
... (8 Replies)
Discussion started by: theclem35
8 Replies
8. Shell Programming and Scripting
Hi,
I want to insert a value (x) in the 3rd position of each line in a file like below
a|b|c|d|1
a|b|c|d
a|b|c|d|e|1
a|b|cso that output file looks like
a|b|x|c|d|1
a|b|x|c|d
a|b|x|c|d|e|1
a|b|x|cI can do that using perl as below
#!/usr/bin/perl -w
use strict;
#inserting x at... (5 Replies)
Discussion started by: sam05121988
5 Replies
9. Shell Programming and Scripting
Hello,
I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it.
I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies
10. Shell Programming and Scripting
Is there a command for sed and awk that will only sort the line with more characters?
#cat file
123
12345
12
asdgjljhhho
bac
ss
Output:
asdgjljhhho
#cat file2
11.2
12345.00
21.222
12345678.10 (2 Replies)
Discussion started by: invinzin21
2 Replies
LEARN ABOUT DEBIAN
bp_revtrans-motif
BP_REVTRANS-MOTIF(1p) User Contributed Perl Documentation BP_REVTRANS-MOTIF(1p)
NAME
revtrans-motif - Reverse translate a Profam-like protein motif
VERSION
Version 0.01
SYNOPSIS
From a file:
revtrans-motif.pl -i motifs.txt
Using pipes:
revtrans-motif.pl < motifs.txt > output.txt
Using interactively at the command prompt:
$ revtrans-motif.pl
MAAEEL[VIKP]
1. ATGGCNGCNGARGARYTNVHN
[^P]H(IW){2,3}
2. NDNCAY(ATHTGG){2,3}
DESCRIPTION
This script takes a protein motif as input and returns a degenerate oligonucleotide sequence corresponding to it. The main reason for doing
this is to design degenerate primers that amplify a given sequence pattern.
The input motif consists of a string of one-letter residues, with any of the following syntactic elements:
[...] : Redundant position.
A position in which more than one residue is allowed. Example:
[TS]YW[RKSD]
^^ ^^^^
[^...] : Negated position.
A position in which any residue is allowed, saved for those between brackets. Example:
[^PW]MK[LAE]
^^
(...){n,m,...} : Repeated motif.
A motif that is repeated n or m times. It can have any of the previous syntactic elements. Example:
A[SN]C(TXX){2,4,8}
^^^
The allowed letters are those that correspond to the 20 natural aminoacids, plus:
B = N + D
Z = Q + E
X = All
OPTIONS
-i input-file:
A file with a list of motifs to reverse translate.
-h
Display this help message.
AUTHOR
Bruno Vecchi, "vecchi.b at gmail.com"
BUGS
Please report any bugs or feature requests to "vecchi.b at gmail.com"
COPYRIGHT & LICENSE
Copyright 2009 Bruno Vecchi, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-03-02 BP_REVTRANS-MOTIF(1p)