Hello all,
I am having trouble with setting up a regular expression used with egrep. My script reads an input file a line at a time. I would like the egrep command to search for the following pattern: server name at the beginning of the line, then one or more spaces, and then a pound sign.
... (5 Replies)
Hi!
I store some data obtained with grep or awk in a file. The problem is that some lines have white space at the begining :
line1
line2
line3
I use something like
grep WORD INFILE >> OUTFILE
awk >> OUTFILE
I would love if it were possible to remove the white whitout parsing the... (4 Replies)
Hi Experts,
I have lots of big size files. Below is the snapshot of a file. From the files i want extract informmation like belows. What could be command or script for that?
DELETE
RESP:940120105
CREATE
RESP:0
GET
RESP:0
File contains like below-
...
...
<log... (8 Replies)
Im trying to add 5 blank spaces to the end of each line in a file in a sed script. I can figure out who o put the spaces pretty much anywhere else but at the end.
thanks
Karl (7 Replies)
Hi,
Please provide shell script to Remove empty lines(space) between two lines containing strings in a file.
Input File :
A1/EXT "BAP_BSC6/07B/00" 844 090602 1605
RXOCF-465 PDTR11 1
SITE ON BATTERY
A2/EXT... (3 Replies)
input file
Desired csv output
gc_type, date/time, milli secs
af, Mar 17 13:09:04 2011, 144.596
af, Mar 20 00:37:37 2011, 144.242
af, ar 20 21:30:59 2011, 108.518
Hi All,
Any help in acheiving the above would be appreciated. I would like to parse through lines within one file and... (5 Replies)
Hi all,
Please go through my requirement.
I have a log file in the location /opt/WebSphere61/AppServer/profiles/EMQbatchprofile/logs/EMQbatch
This file contains the follwing pattern data
<af type="tenured" id="42" timestamp="May 14 13:44:13 2011" intervalms="955.624">
<minimum... (8 Replies)
Hi all,
i have a file that looks like this;
8120 ahdmesb:8001
8330 ahdmesb:8001
8888 vfnla88s-z2:8888
9060 ahdesb:80
9063 ahdesb:80
9070 nleaip-vip:9070
9090 nleaip-vip:9070
9123 nleaip-vip:9080
i want it to be displayed as:
ahdmesb:8001 is listening on port 8120
ahdmesb:8001 is... (2 Replies)
hi guys
how can i add spacein file name with sed if strings have no space around dash
input
19-20
( 18-19 )
ABC-EFG
output after add white space
19 - 20
(18 - 19 )
ABC - EFG
thx in advance (2 Replies)
Discussion started by: mhs
2 Replies
LEARN ABOUT BSD
xstr
XSTR(1) General Commands Manual XSTR(1)NAME
xstr - extract strings from C programs to implement shared strings
SYNOPSIS
xstr [ -c ] [ - ] [ file ]
DESCRIPTION
Xstr maintains a file strings into which strings in component parts of a large program are hashed. These strings are replaced with refer-
ences to this common area. This serves to implement shared constant strings, most useful if they are also read-only.
The command
xstr -c name
will extract the strings from the C source in name, 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 suffices
of existing strings do not cause changes to the data base.
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
This xs.c file should then be compiled and loaded with the rest of the program. If possible, the array can be made read-only (shared) sav-
ing space and swap overhead.
Xstr 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. Xstr reads from its standard input when the argument `-' is given. 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
Xstr does not touch the file strings unless new items are added, thus make 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* Temp file when `xstr name' doesn't touch strings
SEE ALSO mkstr(1)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.
3rd Berkeley Distribution May 7, 1986 XSTR(1)