07-06-2011
@Franklin52
Thanks for you reply
But still it is not working, it is not giving any output.
please explain me this command also, how it will work?
and I want to extract between two strings(string1 and string2 )
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: santosh1234
2 Replies
2. Shell Programming and Scripting
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)
Discussion started by: mjoshi
11 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: the1armedcoder
3 Replies
4. UNIX for Dummies Questions & Answers
Dear Unix Gurus,
I've got a data file with a few hundred lines (see truncated sample)...
BEGIN_SCAN1
TASK_NAME=LA48 PDD Profiles
PROGRAM=ArrayScan
1.00 21.220E+00
2.00 21.280E+00
END_DATA
END_SCAN1
BEGIN_SCAN2
TASK_NAME=LA48 PDD Profiles
194.00 2.1870E+00
... (5 Replies)
Discussion started by: tintin72
5 Replies
5. Shell Programming and Scripting
Hi.
I have a text test1.txt file like:Receipt
Line1
Line2
Line3
End
Receipt
Line4
Line5
Line6
Canceled
Receipt
Line7
Line8
Line9
End (9 Replies)
Discussion started by: TQ3
9 Replies
6. UNIX for Advanced & Expert Users
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)
Discussion started by: Pioneer1976
3 Replies
7. Shell Programming and Scripting
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)
Discussion started by: chrispaz81
4 Replies
8. Shell Programming and Scripting
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)
Discussion started by: mierdatuti
4 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: forevertl
3 Replies
10. Shell Programming and Scripting
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
XSTR(1) BSD General Commands Manual XSTR(1)
NAME
xstr -- extract strings from C programs to implement shared strings
SYNOPSIS
xstr [-cv] [-] [file ...]
DESCRIPTION
The xstr utility maintains a file strings into which strings in component parts of a large program are hashed. These strings are replaced
with references to this common area. This serves to implement shared constant strings, most useful if they are also read-only.
The following options are available:
- Read from the standard input.
-c Extract the strings from the C source file or the standard input (-), replacing string references by expressions of the form
(&xstr[number]) for some number. An appropriate declaration of xstr is prepended to the file. The resulting C text is placed in the
file x.c, to then be compiled. The strings from this file are placed in the strings data base if they are not there already.
Repeated strings and strings which are suffixes of existing strings do not cause changes to the data base.
-v Verbose mode.
After all components of a large program have been compiled a file xs.c declaring the common xstr space can be created by a command of the
form
xstr
The file xs.c should then be compiled and loaded with the rest of the program. If possible, the array can be made read-only (shared) saving
space and swap overhead.
The xstr utility can also be used on a single file. A command
xstr name
creates files x.c and xs.c as before, without using or affecting any strings file in the same directory.
It may be useful to run xstr after the C preprocessor if any macro definitions yield strings or if there is conditional code which contains
strings which may not, in fact, be needed. An appropriate command sequence for running xstr after the C preprocessor is:
cc -E name.c | xstr -c -
cc -c x.c
mv x.o name.o
The xstr utility does not touch the file strings unless new items are added, thus make(1) can avoid remaking xs.o unless truly necessary.
FILES
strings data base of strings
x.c massaged C source
xs.c C source for definition of array xstr
/tmp/xs* temporary file when ``xstr name'' does not touch strings
SEE ALSO
mkstr(1)
HISTORY
The xstr command appeared in 3.0BSD.
BUGS
If a string is a suffix of another string in the data base, but the shorter string is seen first by xstr both strings will be placed in the
data base, when just placing the longer one there will do.
BSD
December 30, 1993 BSD