Hi ,
I just found you while surfing for the string
'Redirecting sql select query output from within a shell script to txt file/excel file'
Could you find time sending me the code for the above question?
It'll be great help for me.
I have a perl file that calls the sql file... (1 Reply)
Hi Yogesh,
Lucky that i caught you online. Yeah i read about DBI and the WriteExcel module. But the server is not supporting these modules. It said..."Cannot locate DBI"..."Cannot locate Spreadsheet::WriteExcel"
I tried creating a simple text file to get the query output, but the... (1 Reply)
Hey guy,
how to make bash script to create foo.txt file and add current date into file content and that file always append.
example: today the script run and add today date into content foo.txt
and tomorrow the script will run and add tomorrow date in content foo.txt without remove today... (3 Replies)
Hi guys,
brand new to this thread and very very new to UNIX...so go easy please!
Anyway I have a file that looks like this:
>>--------------------------------------------------------------------------
Date/Time/Eng. : 2012-06-22 / 00:26 / DS
Reported problem : (SD) ... (5 Replies)
Hi Guys,
I have file A.txt
File A Data
AK1521
AK2536
AK3164
I want create text file of all data above and write some data on each file.
want Output on below folder
/home/kka/out
AK1521.txt
Hi
Welocme (3 Replies)
Hello,
I use UBUNTU 12.04.
I want to write a short program using awk to select some lines in a file based on a second file.
My first file has this format with about 400,000 lines and 47 fields:
SNP1 1 12.1
SNP2 1 13.2
SNP3 1 45.2
SNP4 1 23.4
My second file has this format:
SNP2
SNP3... (1 Reply)
Hi all,
I am new to AWK and I am trying to solve a problem that is probably easy for an expert. Suppose I have the following data file input.txt:
20 35 43
20 23 54
20 62 21
20.5 43 12
20.5 33 11
20.5 89 87
21 33 20
21 22 21
21 56 87
I want to select from all lines having the... (4 Replies)
Hello
I have a large file1 which has many events like "2014010420" and following lines under each event that start with text . It has this form:
2014010420 num --- --- num ....
NTE num num --- num...
EFA num num --- num ...
LASW num num --- num... (9 Replies)
I have a txt file with a list of error messages in a xml tag format, and each error message is separated with a identifier(endresult).Need to split that and copy and create a new html file.Error message has some special character. how to escape the special character and insert my data into the... (7 Replies)
Discussion started by: DevAakash
7 Replies
LEARN ABOUT DEBIAN
swiss::textfunc
SWISS::TextFunc(3pm) User Contributed Perl Documentation SWISS::TextFunc(3pm)NAME
SWISS::TextFunc
DESCRIPTION
This module is designed to be a repository of functions that are repeatedly used during parsing and formatting of SWISS-PROT/TREMBL lines.
If more than two line types need to do aproximately the same thing then it is probably in here.
All functions expect to be called as package->function(param list)
listFromText
Takes a piece of text, a seperator regex and a seperator that may appear at the end. Returns an array of items that were seperated in
the text by that seperator. Takes care of null items (looses them for you).
textFromList
Takes an array of items, a separator, a terminating string, and a line width. Returns an array of strings, each ending with the
separator or the terminator with a width less than or equal to the width specified.
Seems to do the wrong thing for references - not sure why. Don't use it for that.
wrapText
Takes a string and a length. Returns an array of strings which are shorter or equal in length to length, spliting the string on white
space.
wrapOn ($firstLinePrefix, $linePrefix, $colums, $text[, @separators])
Wraps $text into lines with at most $colums colums. Prepends the prefixes to the lines. @separators is a list of expressions on which
to wrap. The expression itself is part of the upper line.
If no @separators are provided, the $text is wrapped at whitespace except in EC/TC numbers or at dashes that separate words.
First tries to wrap on the first item of @separators, then the next etc. If no wrap on any element of @separators or whitespaces is
possible, wraps into lines of exactly length $colums.
A special case is that the first item of @separators may be a reference to an array. This is used internally for wrapping FT VARIANT-
like lines.
Example:
wrapOn('DE ', 'DE ', 40,
'14-3-3 PROTEIN BETA/ALPHA (PROTEIN KINASE C INHIBITOR PROTEIN-1)',
's+')
returns ['14-3-3 PROTEIN BETA/ALPHA (PROTEIN ',
'KINASE C INHIBITOR PROTEIN-1)']
wrapOn('DE ', 'DE ', 40,
'14-3-3 PROTEIN BETA/ALPHA (PROTEIN KINASE C INHIBITOR PROTEIN-1)',
' (?=()', 's+')
returns ['14-3-3 PROTEIN BETA/ALPHA ',
'(PROTEIN KINASE C INHIBITOR PROTEIN-1)']
cleanLine
Remove the leading line Identifier and three blanks and trailing spaces from an SP line.
joinWith ($text, $with, $noAddAfter, @list)
Concatenates $text and @list into one string. Adds $with between the original elements, unless the postfix of the current string is
$noAddAfter. This is used to avoid inserting blanks after hyphens during concatenation. So unpleasant strings like 'CALMODULIN-
DEPENDENT' are avoided. Unfortunately a correct reassembly of strings like 'CARBON-DIOXIDE' is not done.
insertLineGroup ($textRef, $text, $pattern)
Inserts text block $text into the text referred to by $textRef. $text will replace the text block in $textRef matched by $pattern.
uniqueList (@list)
Returns a list in which all duplicates from @list have been removed.
currentSpDate
returns the current date in SWISS-PROT format
toMixedCase($text, @regexps)
Convert a text to mixed case, according to one or more regular expressions. In scalar context, returns the new text; in array context,
also returns the regexp with which the change was performed, or undef on failure. See corresponding item in SWISS::GN for more
details.
perl v5.10.1 2006-08-31 SWISS::TextFunc(3pm)