Sponsored Content
Top Forums Shell Programming and Scripting Search complicated strings on file Post 302419769 by Orbix on Saturday 8th of May 2010 02:00:17 PM
Old 05-08-2010
Search complicated strings on file

Can someone help me? I been figuring out how I can search and extract a complicated search string from a file. The whole string is delimited by a period. And the file where I'm searching is composed of differnt string such as that. For example, I have this search string:

Quote:
sim.lim.13_60.colorValidationResponse
and I have a file containing:

Quote:
acm.omg.19_10.figureRetrieveAnswer
mai.lim.13_60.colorValidationResponse
hmo.bimx.10_10.staffInformationFile
sim.nam.13_60.colorValidationResponse
sim.lim.12_80.colorValidationResponse
sim.lim.13_60.colorValidationRequest
sim.lim.14_90.colorValidationResponse
sim.nam.13_60.colorValidationResponse
Now I need four outputs since my search string is divided into four strings delimited by period:

Quote:
1st Output:
mai.lim.13_60.colorValidationResponse

2nd Output:
sim.nam.13_60.colorValidationResponse
sim.nam.13_60.colorValidationResponse

3rd Output:
sim.lim.12_80.colorValidationResponse
sim.lim.14_90.colorValidationResponse

4th Output:
sim.lim.13_60.colorValidationRequest
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find information from complicated strings

Hi experts, I have the file with these lines: var1=thu_13:12:32,var2=Microsoft,var3=240ms,var4=Mozilla/4.0_(sun;_MSIR_3-4;_windows.;_NET_1.1323.53 var1=thu_13:13:32,var2=Microsoft,var3=213ms,var4=Mozilla/4.0_(sun;_MSIR_3-4;_windows.;_NET_1.1323.53... (9 Replies)
Discussion started by: lalelle
9 Replies

2. Shell Programming and Scripting

How to search multiple strings in a file

Hi All, I want to search all the ksh scripts that has following details. 1. Search for "exit 0" 2. Search for "sqlldr" or sqlplus" 3. In the above files i want to search for all the script that has no "case" in it. Please advice. Thanks, Deep (2 Replies)
Discussion started by: deepakpv
2 Replies

3. Shell Programming and Scripting

complicated search within file

Hi, I have following problem. I have a file with time stamps and some data describing what happened between time stamps. Something like this: 10:00 meeting with K meeting with L 11:00 lunch 12:00 work with K 13:00 From this file I have to get a file with... (7 Replies)
Discussion started by: mmike
7 Replies

4. Shell Programming and Scripting

search file between last occurence of 2 strings

I need to extract the last block of /== START OF SQLPLUS ==/ and /== END OF SQLPLUS ==/. The logifle is written to several times in a day using >> to append. I need a solution using grep/sed. logfile looks like this START OF LOGFILE /== START OF SQLPLUS ==/ ERROR /== END OF SQLPLUS... (5 Replies)
Discussion started by: hanton
5 Replies

5. Emergency UNIX and Linux Support

Complicated SED search required

Hi All, I'm trying to extract all the description fields from a MIB file which contain multiple instances of the following text: ENTERPRISE compaq VARIABLES { sysName, cpqHoTrapFlags, cpqSsBoxCntlrHwLocation, cpqSsBoxCntlrIndex, cpqSsBoxBusIndex,... (10 Replies)
Discussion started by: badoshi
10 Replies

6. Shell Programming and Scripting

Script Search replace - complicated

I have a text file for which i need a script which does some fancy search and replace. Basically i want to loop through each line, if i find an occurance of certain string format then i want to carry on search on replace another line, once i replaced this line i will contine to search for the... (7 Replies)
Discussion started by: kelseyh
7 Replies

7. Shell Programming and Scripting

Search multiple Strings in a File

Hi I want to search multiple strings in a file . But the search should start with "From" Keyword and end with before "Where" keyword. Please suggest me. Thanks (2 Replies)
Discussion started by: sboss
2 Replies

8. Shell Programming and Scripting

Extended replacing of nonspecific strings in text files [beware complicated !]

Well, to make another post at this helpful forum :b::D: I recently tried something like this, I want to replace all those numberings/letters that are located between <string>file://localhost/var/mobile/Applications/ and /Documents/</string> numberings =---- replace with: first... (6 Replies)
Discussion started by: pasc
6 Replies

9. Shell Programming and Scripting

Search strings from array in second file

I have a file search_strings.txt filled with search strings which have a blank in between and look like this: S. g. Erh. o. J. v. d. Chijs g. Ehr.I would like to search the strings in the second given Textfile.txt and it shall return the column number. Can anybody help with the correct... (3 Replies)
Discussion started by: sdf
3 Replies

10. Shell Programming and Scripting

Read in search strings from text file, search for string in second text file and output to CSV

Hi guys, I have a text file named file1.txt that is formatted like this: 001 , ID , 20000 002 , Name , Brandon 003 , Phone_Number , 616-234-1999 004 , SSNumber , 234-23-234 005 , Model , Toyota 007 , Engine ,V8 008 , GPS , OFF and I have file2.txt formatted like this: ... (2 Replies)
Discussion started by: An0mander
2 Replies
EXT2SIM(1)						      General Commands Manual							EXT2SIM(1)

NAME
ext2sim - convert hierarchical ext(5) extracted-circuit files to flat sim(5) files SYNOPSIS
ext2sim [ -a aliasfile ] [ -l labelsfile ] [ -o simfile ] [ -A ] [ -B ] [ -F ] [ -L ] [ -t ] [ extcheck-options ] [ -y num ] [ -f mit|lbl|su ] [ -J hier|flat ] [ -j device:sdRclass[/subRclass]/defaultSubstrate ] root DESCRIPTION
Ext2sim will convert an extracted circuit from the hierarchical ext(5) representation produced by Magic to the flat sim(5) representation required by many simulation tools. The root of the tree to be extracted is the file root.ext; it and all the files it references are recursively flattened. The result is a single, flat representation of the circuit that is written to the file root.sim, a list of node aliases written to the file root.al, and a list of the locations of all nodenames in CIF format, suitable for plotting, to the file root.nodes. The file root.sim is suitable for use with programs such as crystal(1), esim(1), or sim2spice(1). The following options are recognized: -a aliasfile Instead of leaving node aliases in the file root.al, leave it in aliasfile. -l labelfile Instead of leaving a CIF file with the locations of all node names in the file root.nodes, leave it in labelfile. -o outfile Instead of leaving output in the file root.sim, leave it in outfile. -A Don't produce the aliases file. -B Don't output transistor or node attributes in the .sim file. This option will also disable the output of information such as the area and perimeter of source and drain diffusion and the fet substrate. For compatibitlity reasons the latest version of ext2sim outputs this information as node attibutes. This option is necessary when preparing input for programs that don't know about attributes, such as sim2spice(1) (which is actually made obsolete by ext2spice(1), anyway), or rsim(1). -F Don't output nodes that aren't connected to fets (floating nodes). -L Don't produce the label file. -tchar Trim characters from node names when writing the output file. Char should be either "#" or "!". The option may be used twice if both characters are desired. -f MIT|LBL|SU Select the output format. MIT is the traditional sim(5) format. LBL is a variant of it understood by gemini(1) which includes the substrate connection as a fourth terminal before length and width. SU is the internal Stanford format which is described also in sim(5) and includes areas and perimeters of fet sources, drains and substrates. -y num Select the precision for outputing capacitors. The default is 1 which means that the capacitors will be printed to a precision of .1 fF. -J hier|flat Select the source/drain area and perimeter extraction algorithm. If hier is selected then the areas and perimeters are extracted only within each subcell. For each fet in a subcell the area and perimeter of its source and drain within this subcell are out- put. If two or more fets share a source/drain node then the total area and perimeter will be output in only one of them and the other will have 0. If flat is selected the same rules apply only that the scope of search for area and perimeter is the whole netlist. In general flat (which is the default) will give accurate results (it will take into account shared sources/drains) but hier is provided for backwards compatibility with version 6.4.5. On top of this selection you can individually control how a ter- minal of a specific fet will be extracted if you put a source/drain attribute. ext:aph makes the extraction for that specific terminal hierarchical and ext:apf makes the extraction flat (see the magic tutorial about attaching attribute labels). Addition- aly to ease extraction of bipolar transistors the gate attribute ext:aps forces the output of the substrate area and perimeter for a specific fet (in flat mode only). -j device:sdRclass[/subRclass]/defaultSubstrate Gives ext2sim information about the source/drain resistance class of the fet type device. Makes device to have sdRclass source drain resistance class, subRclass substrate (well) resistance class and the node named defaultSubstrate as its default substrate. The defaults are nfet:0/Gnd and pfet:1/6/Vdd which correspond to the MOSIS technology file but things might vary in your site. Ask your local cad administrator. The way the extraction of node area and perimeter works in magic the total area and perimeter of the source/drain junction is summed up on a single node. That is why all the junction areas and perimeters are summed up on a single node (this should not affect simulation results however). Special care must be taken when the substrate of a fet is tied to a node other than the default substrate (eg in a bootstraping charge pump). To get the correct substrate info in these cases the fet(s) with separate wells should be in their own separate subcell with ext:aph attributes attached to their sensitive terminals (also all the transistors which share sensistive terminals with these should be in another subcell with the same attributes). In addition, all of the options of extcheck(1) are accepted. SCALING AND UNITS
If all of the .ext files in the tree read by ext2sim have the same geometrical scale (specified in the scale line in each .ext file), this scale is reflected through to the output, resulting in substantially smaller .sim files. Otherwise, the geometrical unit in the output .sim file is a centimicron. Resistance and capacitance are always output in ohms and femptofarads, respectively. SEE ALSO
extcheck(1), ext2dlys(1), ext2spice(1), magic(1), rsim(1), ext(5), sim(5) AUTHOR
Walter Scott additions/fixes by Stefanos Sidiropoulos. BUGS
Transistor gate capacitance is typically not included in node capacitances, as most analysis tools compute the gate capacitance directly from the gate area. The -c flag therefore provides a limit only on non-gate capacitance. The areas and perimeters of fet sources and drains work only with the simple extraction algorith and not with the extresis flow. So you have to model them as linear capacitors (create a special extraction style) if you want to extract parasitic resistances with extresis. 4th Berkeley Distribution EXT2SIM(1)
All times are GMT -4. The time now is 11:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy