Hi
I have the following requirement. i have the following line from a log file
one : two : Three : four : five : six : seven : eight :nine :ten
Now can you pls help what i should do to get only the following output from the above line
two : five : six : seven : Eight
appreciate your... (3 Replies)
I've got this command that I've been using to find strings on the same line, say I'm doing a search for name:
find . -name "*" | xargs grep -i "Doe" | grep -i "John" > output.txt
This gives me every line in a file that has John and Doe in it. I'm looking to add a OR operator for the second... (5 Replies)
Hi all,
The following lines are taken from a long paragraph:
Labels of output orbitals: RY* RY* RY* RY* RY* RY*
1\1\GINC-COMPUTE-1-3\SP\UB3LYP\6-31G\C2H5Cr1O1(1+,5)\LIUZHEN\19-Jan-20
10\0\\# ub3lyp/6-31G pop=(nbo,savenbo) gfprint\\E101GECP\\1,5\O,0,-1.7
... (1 Reply)
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 ,
I'm a newbie.Never worked on Unix before. I want a shell script to perform the following:
I want to extract strings from each line ,based on the type of line(Nameline,Subline) and output it to another file.Below is a sample format.
2010-12-21 14:00"1"Nameline"Midterm"First Name:Jane ... (4 Replies)
I am trying to extract multiple strings from snmp-mib files like below.
-----
$ cat IF-MIB.mib
<snip>
linkDown NOTIFICATION-TYPE
OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }
STATUS current
DESCRIPTION
"A linkDown trap signifies that the SNMP entity, acting in... (5 Replies)
Hi,
I wasn't quite sure how to title this one! Here goes:
I have some already partially parsed log files, which I now need to extract info from. Because of the way they are originally and the fact they have been partially processed already, I can't make any assumptions on the number of... (8 Replies)
I need to extract multiple occurance strings between 2 different patterns in given line.
For e.g. in below as input
-------------------------------------------------------------------------------------
mike(hussey) AND mike(donald) AND mike(ryan) AND mike(johnson)... (8 Replies)
Hi
I use sed comnand to remove occurance of one workd from a line.
However I need to removed occurance of dufferent words in ne line.
Original-1 Hi this is the END of my begining
Comand sed s/"END"/"start"/g
Output-1 Hi this is the start of my beginig
But I have more... (9 Replies)
Discussion started by: mnassiri
9 Replies
LEARN ABOUT FREEBSD
xstr
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