Can someone tell me how to do this using sed, awk, or any other basic shell scripting? Basically I have two text files with the following contained in each file:
File A:
a b c
d e f
g h i
File B:
1
2
3
I want the final outcome to look like this:
a b c 1
d e f 2
g h i 3
How... (3 Replies)
I have a file that is large and is broken up by groups of data. I want to take certain fields and display them different to make it easier to read. Given input file below:
2008 fl01 LAC 2589 polk doal
xx 2008q1 mx
sect 25698541
Sales 08 Dept group
lead1 ... (8 Replies)
Hi,
Currently I am coding up a nasty way of reading file input using *cat* rather than *read*. My text input looks like
TextA 100
TextB 110
TextC 120
Currently I am using cat |while read line to read the first column and second column fields.
cat foo.txt|while read line
do
... (1 Reply)
Hello all,
I have some text formatted as follows
Name: John doe
Company:
Address 1: 7 times the headache
Address 2:
City: my city
State/Province: confusion
Zip/Postalcode: 12345
and I'm trying to figure out how I could extract the data after the colon so that the result would be ... (6 Replies)
I'm trying to write a script that will parse the output of the iostat command in real time and place the output in csv file(s). I do have a programming background, but am relatively new to shell so I'm having difficulties determining how to proceed.
The cpu stats will go into one output... (6 Replies)
Hello
I have a file that contains 10 rows as below:
"ID" "DP"
"ID=GRMZM2G015073_T01" "23.6044288292005"
"ID=GRMZM2G119852_T01" "59.7782287606723"
"ID=GRMZM2G100242_T02" "61.4167813736184"
"ID=GRMZM2G046274_T01" "6.63061838134219"
"ID=GRMZM2G046274_T02" ... (5 Replies)
Hello I am trying to develop a shell script that takes a text file such as this...
E-mail@ Soc.Sec.No. *--------Name-----------* Class *School.Curriculum.Major.* Campus.Phone
JCC2380 XXX-XX-XXXX CAREY, JULIE C JR-II BISS CPSC BS INFO TECH 412/779-9445
JAC1936 XXX-XX-XXXX... (7 Replies)
A record contains 50 fields separated by "~". I need to assign each of these fields to different variables. Following is the shell script approach I tried.
RECORD="FIELD1~FIELD2~FIELD3~FIELD4~FIELD5~...........~FIELD50"
VAR1=$(echo ${RECORD} | cut -d"~" -f 1)
VAR2=$(echo ${RECORD} | cut... (5 Replies)
I am trying to work on a script to grab the UTC time from a website
So far I was able to cobble this together.
curl -s --head web-url | grep ^Date: | sed 's/Date: //g'
Which gives me the result I need.
Wed, 06 Dec 2017 21:43:50 GMT
What I need to is extract the 21:43:50 and convert... (4 Replies)
Discussion started by: allisterB
4 Replies
LEARN ABOUT DEBIAN
swiss::entry
SWISS::Entry(3pm) User Contributed Perl Documentation SWISS::Entry(3pm)Name
SWISS::Entry
Description
Main module to handle SWISS-PROT entries. One Entry object represents one SWISS-PROT entry and provides an API for its modification.
The basic concept is the idea of lazy parsing. If an Entry object is created from the entry in flat file format, the text is simply stored
in the private text attribute of the entry object. The member objects of the entry are only created if they are dereferenced.
Example
This minimum program reads entries from a file in SWISS-PROT format and prints the primary accession number for each of the entries.
Attributes
The following attributes represent member objects. They can be accessed like e.g. $entry->IDs
IDs ID line object
ACs
DTs
DEs
GNs
OSs
OCs
Refs
The reference block object
CCs
KWs
DRs
FTs
Stars
Object for the annotator's section stored in the ** lines.
SQs The sequence object.
Methods
new Return a new Entry object
initialize
Initialise an Entry object and return it.
update [force]
Update an entry. The content of the member objects is written back into the private text attribute of the entry if necessary. If $force
is true, an update of all member objects is forced.
reformat
Reformat all fields of an entry.
fromText $text [, $fullParse[, $removeInternalComments]]
Create an Entry object from the text $text. If $fullParse is true, the entry is parsed at creation time. Otherwise the individual line
objects are only created if they are dereferenced. If $removeInternalComments is true, wild comments and indentation will be removed
from the text before the parsing is done. [NOTE: wild comments are lines starting with a double asterisk located outside the Stars
section, and indented lines are lines starting with spaces. Both are used internally by SWISS-PROT annotators during their work and
excluded from internal and external releases.]
toText [$insertInternalComments]
Return the entry in flat file text format. If internal comments and indentation have been removed as specified in the parameters to
fromText(), you may wish to reinsert them in the text output by setting $insertInternalComments to true.
toFasta
Return the entry in Fasta format.
equal
Returns True if two entries are equal, False otherwise
The following methods are provided for your convenience. They are shortcuts for methods of the individual line objects.
ID Returns the primary ID of the entry.
AC Returns the primary AC of the entry.
SQ Returns the sequence of the entry.
EV Returns the EV (evidence) object of an entry. SWISS-PROT internal method.
Data access methods
text
Returns the current text of the entry. Quick and dirty! No update of the text is performed before.
database_code
Is it a SWISS-PROT, TREMBL or TREMBLNEW entry? database_code tries to find it out. Return values are S for SWISS-PROT, 3 for TREMBL,
Q for TREMBLNEW, ? for unknown.
isFragment
Returns true if the DE line indicates a fragment, or of the entry contains a NON_CONS or NON_TER feature.
isCurated
Returns 1 if the entry is a curated entry, 0 otherwise.
SWISS-PROT internal use only.
perl v5.10.1 2008-07-16 SWISS::Entry(3pm)