I want to extract some text between two strings in a line i am using following command i.e;
contents of file is---
but it is showing complete line which is having searched strings.
I want only
so can any one help me to do this task?
Thanks
Manish
Last edited by Franklin52; 07-06-2011 at 04:08 AM..
Reason: Please use code tags for code and data samples, thank you
I have a file like: myfile.txt
it is easy to learn awk and begin awk scripting
and awk has got many features
awk is a powerful text processing tool
Now i want to get the text between first awk and immediate awk not the third awk . How to get it ? its urgent pls help me and file is unevenly... (2 Replies)
Hi,
I have a file from which i need to extract data between two constant strings.
The data looks like this :
Line 1 SUN> read db @cmpd unit 60
Line 2 Parameter: CMPD -> "C00071"
Line 3
Line 4 SUN> generate
Line 5 tabint>ERROR: (Variable data)
The data i need to extract is... (11 Replies)
Hi,
I'm trying to retrieve text between two strings excluding the two strings.
So for example I have the following input:
type=friend
username=phone1
secret=password
host=dynamic
dtmfmode=rfc2833
mailbox=9664
context=sip
insecure=very
canreinvite=no
nat=yes
realm=192.168.1.122... (3 Replies)
I have a text wich looks like this:
clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
Hi I have something like this:
EXAMPLE 1
CREATE UNIQUE INDEX "STRING_1"."STRING_2" ON "BOSNI_CAB_EVENTO"
("CD_EVENTO" , "CD_EJECUCION" ) PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 5242880 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "DB1000_INDICES_512K"... (4 Replies)
Hi,
I have a text like these:
ECHO "BEGGINING THE SHELL....."
MV FILE1 > FILE2
UNIQ_ID=${1}
PARTITION_1=`${PL}/Q${CON}.KSH "SELECT ....."
PARTITION_2=`${PL}/Q${CON}.KSH "SELECT ........"
${PL}/Q${CON}.KSH "CREATE ...."
IF ....
.......
I would like to extract only text that only... (4 Replies)
Dear all,
I have a data like below (n of rows=400,000) and I want to extract the rows with certain strings. I use code below. It works if there is not too many strings for example n of strings <5000. while I have 90,000 strings to extract. If I use the egrep code below, I will get error:
... (3 Replies)
I have a file conatining the below:
---
10.9.16.116:
/tmp/5835113081224811756.jar:
hash: e6df90d38fa86f0e289f73d79cd2cfd2a29954eb
/tmp/4603745991442278706.jar:
hash: e6df90d38fa86f0e289f73d79cd2cfd2a29954eb
10.9.14.126:
/tmp/conf/extra/httpd-ssl.conf:
hash:... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT ULTRIX
strextract
strextract(1int)strextract(1int)Name
strextract - batch string extraction
Syntax
strextract [ -p patternfile ] [ -i ignorefile ] [ -d ] [ source-program... ]
Description
The command extracts text strings from source programs. This command also writes the string it extracts to a message text file. The mes-
sage text file contains the text for each message extracted from your input source program. The command names the file by appending .msg to
the name of the input source program.
In the source-program argument, you name one or more source programs from which you want messages extracted. The command does not extract
messages from source programs included using the directive. Therefore, you might want a source program and all the source programs it
includes on a single command line.
You can create a patterns file (as specified by patternfile ) to control how the command extracts text. The patterns file is divided into
several sections, each of which is identified by a keyword. The keyword must start at the beginning of a new line, and its first character
must be a dollar sign ($). Following the identifier, you specify a number of patterns. Each pattern begins on a new line and follows the
regular expression syntax you use in the routine. For more information on the patterns file, see the(5int) reference page.
In addition to the patterns file, you can create a file that indicates strings that ignores. Each line in this ignore file contains a sin-
gle string to be ignored that follows the syntax of the routine.
When you invoke the command, it reads the patterns file and the file that contains strings it ignores. You can specify a patterns file and
an ignore file on the command line. Otherwise, the command matches all strings and uses the default patterns file.
If finds strings which match the directive in the pattern file, it reports the strings to standard error (stderr.) but does not write the
string to the message file.
After running you can edit the message text file to remove text strings which do not need translating before running
It is recommended that you use command as a visual front end to the command rather than running directly.
Options-i Ignore text strings specified in ignorefile. By default, the command searches for ignorefile in the current working directory, your
home directory, and
If you omit the option, recognizes all strings specified in the patterns file.
-p Use patternfile to match strings in the input source program. By default, the command searches for the pattern file in the current
working directory, your home directory, and finally
If you omit the option, the command uses a default patterns file that is stored in
-d Disables warnings of duplicate strings. If you omit the option, prints warnings of duplicate strings in your source program.
Restrictions
Given the default pattern file, you cannot cause to ignore strings in comments that are longer than one line.
You can specify only one rewrite string for all classes of pattern matches.
The command does not extract strings from files include with directive. You must run the commands on these files separately.
% strextract -p c_patterns prog.c prog2.c
% vi prog.msg
% strmerge -p c_patterns prog.c prog2.c
% gencat prog.cat prog.msf prog2.msf
% vi nl_prog.c
% vi nl_prog2.c
% cc nl_prog.c nl_prog2.c -li
In this example, the command uses the file to determine which strings to match. The input source programs are named and
If you need to remove any of the messages or extract one of the created strings, edit the resulting message file, Under no conditions
should you add to this file. Doing so could result in unpredictable behavior.
You issue the command to replace the extracted strings with calls to the message catalog. In response to this command, creates the source
message catalogs, and and the output source programs, and
You must edit and to include the appropriate and function calls.
The command creates a message catalog and the command creates an executable program.
See Alsointro(3int), gencat(1int), extract(1int), strmerge(1int), regex(3), catopen(3int), patterns(5int)
Guide to Developing International Software
strextract(1int)