I have a file which has bunch of lines which starts from a fixed pattern and ends with another fixed pattern.
I want to make use of these fixed starting and ending patterns to select the bunch, one at a time.
The input file is as follows.
I tried using awk '/Hi welcome/,/Bye**/' inputfile.txt to select text from Hi welcome to Bye** However, it selects complete document may be because even whole document starts with "Hi welcome" and ends with "Bye**". Here I am trying to get it block by block (From Hi welcome to Bye** is one block) in a temp file by using for loop.
Please help. Little urgent.
Thank you.
Anu.
Last edited by Scrutinizer; 09-24-2012 at 07:58 AM..
Reason: code tags
Need to delete a text block inside a file, that is marked with a start and an end pattern. Eg
do not delete
not delete
<tag1>
delete everything here
here
and here
and here...
<tag2>
do not delete
do not delete....
Believe sed is able to do this job but don't get it working.
... (1 Reply)
Input:
fstab is a configuration
file that contains information
of all the partitions
and storage devices
in your computer.
The file is located under /etc,
so the full path
to this file is /etc/fstab.
The >>>>> characters would be replaced by some texts.
For example if i run a... (5 Replies)
Hello all,
I have a large output file from which I would like to extract a single block of text.
An example block of text is shown below:
***** EQUILIBRIUM GEOMETRY LOCATED *****
COORDINATES OF ALL ATOMS ARE (ANGS)
ATOM CHARGE X Y Z
... (10 Replies)
I was reading a book on UNIX internals "The design of the UNIX Operating system." There are two memory structures that are confusing me:
1) Buffer cache
2) Inode cache
My questions are
1) Does a process get both buffer cache and Indoe cache allocated when it opens/creates a file?
2) if no,... (1 Reply)
Hi
I am looking for the way to delete the block of data for example
original file
line1
line2
line3
line4
line5
input file
line2
line3
original file should contain
line1
line4
line5 (3 Replies)
I have a "main" file which has blocks of data for each user defined by tags BEGIN and END.
BEGIN
ID_NUM:24879
USER:abc123
HOW:47M
CMD1:xyz1
CMD2:arp2
STATE:active
PROCESS:id60
END
BEGIN
ID_NUM:24880
USER:def123
HOW:4M
CMD1:xyz1
CMD2:xyz2
STATE:running
PROCESS:id64
END (7 Replies)
I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed.
See below for the example data.
................................server 1...............................
running process 1
running... (8 Replies)
Hello all,
I am working on a script which should parse a large file called input.txt which contains table definitions, index definitions and comments like these ones:
------------------------------------------------
-- DDL Statements for table "CMWSYS"."CMWD_TEC_SUIVI_TRT"... (12 Replies)
I need to search for a block with the starting pattern say
"tabId": "table_1", and ending pattern say "]"
and then add a few lines before "]"
"block1":"block_111"
"tabId": "table_1",
"title":"My title"
.....
....
}]
how do I achieve it using awk and sed.
Thanks,
Lakshmi (3 Replies)
I am hoping to pull multiple strings from one file and use them to search within a block of text within another file.
File 1PS001,001 HLK
PS002,004 MWQ
PS004,002 RXM
PS004,006 DBX
PS004,006 SBR
PS005,007 ML
PS005,009 DBR
PS005,011 MR
PS005,012 SBR
PS006,003 RXM
PS006,003 >SJ
PS006,010... (11 Replies)
Discussion started by: jvoot
11 Replies
LEARN ABOUT DEBIAN
fastautils
fastautils(1) FASTA format file manipulation utilities fastautils(1)NAME
fastautils - FASTA format file manipulation utilities
SYNOPSIS
fastachecksum [ options ] <input file>
fastaclean
fastaclip
fastacomposition
fastadiff
fastaexplode
fastafetch
fastahardmask
fastaindex
fastalength
fastanrdb
fastaoverlap
fastareformat
fastaremove
fastarevcomp
fastasoftmask
fastasort
fastasplit
fastasubseq
fastatranslate
fastavalidcds
DESCRIPTION
These are utilities for the manipulation of FASTA format sequence databases which are distributed with the exonerate sequence alignment
program.
ENVIRONMENT
Not documented yet.
EXAMPLES
fastalength sequence.fasta
blah blah
VERSION
This documentation accompanies version 2.2.0 of the exonerate package.
AUTHOR
Guy St.C. Slater. <guy@ebi.ac.uk>. See the AUTHORS file accompanying the source code for a list of contributors.
AVAILABILITY
This source code for the exonerate package is available under the terms of the GNU general public licence.
Please see the file COPYING which was distrubuted with this package, or http://www.gnu.org/licenses/gpl.txt for details.
This package has been developed as part of the ensembl project. Please see http://www.ensembl.org/ for more information.
SEE ALSO exonerate(1),e-PCR
fastautils March 2003 fastautils(1)