If the matching is similar, then consider the following example
(we can then proceed by analogy adapting the matching to our needs)
Code:
[ctsgnb@shell ~]$ cat mys
toto
bla
124
125
[ctsgnb@shell ~]$ cat myfile
134512345 toto whateva
124523043 hhhh nothing
123512344 anyword bla
125412450 hshs juju
124452344 titi bla
123451345 hhhhhhh tatat
[ctsgnb@shell ~]$ sed 's/.*/^&/' mys
^toto
^bla
^124
^125
[ctsgnb@shell ~]$ sed 's/.*/^&/' mys | grep -f - myfile
124523043 hhhh nothing
125412450 hshs juju
124452344 titi bla
[ctsgnb@shell ~]$
another one :
Code:
[ctsgnb@shell ~]$ cat myfile
134512345 toto whateva
124523043 hhhh nothing
124599943 bla nothing
123512344 anyword bla
125412450 hshs juju
124452344 titi bla
123451345 hhhhhhh toto
125412450 bla juju
125412450 toto juju
[ctsgnb@shell ~]$ cat mys
toto
bla
124
125
[ctsgnb@shell ~]$ sed 's/.*/^.\\{10\\}&/' mys | grep -f - myfile
134512345 toto whateva
124599943 bla nothing
125412450 bla juju
125412450 toto juju
[ctsgnb@shell ~]$
Hi Guys,
While I was writing one shell script , I just got struck at this point.
I need to extract words from a file at some specified position and do some comparison operation and need to replace the extracted word with another word.
Eg : I like Orange very much.
I need to replace... (19 Replies)
Hi
Im trying to extract a specific pattern of data from a log file and store it in a other file, Im executing the below command in various files and storing it in a single file. I data that Im storing needs to be arranged based on a date and timestamp. Please assist, how to achieve this. Thanks... (1 Reply)
Hi Gurus,
I've been having some problem in extracting the log data based on the current date and month.
As shown in the sample data below, how to extract the log info for Aug 11?
Sample data:
root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35)
root pts/ta userpc... (13 Replies)
I have a huge file (about 2 millions records) contains data separated by “,” (comma). As part of the requirement, I can't change the format. The objective is to remove some of the records with the following condition. If the 23rd field on each line start with 302 , I need to remove that from the... (4 Replies)
How to extract multiple data based on character position. I need to fetch from 7-9 and 22-26 and there is no delimiter for 22-26 since it is part of the column. The file may have more than 1000 character long.I managed to pull any one but not both
for example
test data
12345 zxc vbnmlk... (1 Reply)
I have a csv file that I need to extract some data from depending on another field after reading info from another text file.
The text file would say have 592560 in it.
The csv file may have some data like so
Field 1 Field2 Field3 Field4 Field5 Field6
20009756 1 ... (9 Replies)
Hi, I have a file1 of many long sequences, each preceded by a unique header line. file2 is 3-columns list: headers name, start position, end position. I'd like to extract the sequence region of file1 specified in file2.
Based on a post elsewhere, I found the code:
awk... (2 Replies)
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Discussion started by: Pradhikshan
9 Replies
LEARN ABOUT DEBIAN
declar
DECLAR(3) GENPAT functions DECLAR(3)NAME
DECLAR, GENPAT Package
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
SYNOPSYS
DECLAR("ident",":nb_space","format",mode,size,option);
PARAMETERS
ident External connector, internal observing points or register's name. For the hierarchical descriptions, the path-name of the inter-
nal observing points or registers must be specified by the syntax : instance1.instance11.name .
nb_space Specify the number of blank space between each group of value associated to the connectors, signals or registers in the output
file. 0,1,2,3,4,5,6,7,8,9 or nothing.
format Specify the format that will be used to represent the value associated to the connectors, signals or registers. X for Hexadeci-
mal, O for Octal and B for Binary.
mode Specify the type of the connectors. IN for Input, OUT for Output, INOUT for Input/Output, SIGNAL for internal observing point,
REGISTER for register. IN, OUT, INOUT, SIGNAL, REGISTER are constants (defines) provided by genpat.
size Specify the size of the bused connectors : empty ("") for the scalar connectors, "nb1" for the numbered connectors, "nb1 TO nb2"
or "(nb1 TO nb2)" (nb1 < nb2), "nb1 DOWNTO nb2" or "(nb1 DOWNTO nb2)" (nb2 < nb1) for the vectors. Where nb1 and nb2 are integer.
option Specify options of the connector. "S" for a spied connector, empty ("") for a normal connector.
DESCRIPTION
Describes a set of connectors, signals or registers of the same format, size and mode.
EXAMPLE
DECLAR("a", ":2", "X", OUT, "3 DOWNTO 0", "S");
describes : a 3, a 2, a 1, a 0
format : Hexadecimal.
mode : Output.
option : Spied connector.
the group is separated of the others with 2 blank spaces.
result :
out a(3 downto 0) X spy ;;;
DECLAR ("toto", ":", "O", INOUT, "7 TO 11", "");
describes : toto 7, toto 8, toto 9, toto 10, toto 11.
format : Octal.
mode : Input/Output.
option : none.
the group is separated of the following with 0 blank space.
result :
inout toto(7 to 11) O ;
DECLAR ("ck", ":2", "B", IN, "", "");
describes : ck.
format : Binary.
mode : Input.
option : none.
the port is separated of the following with 2 blank spaces.
result :
in ck ;;;
DECLAR ("accu.f", ":", "B", SIGNAL, "", "S");
describes : accu.f .
format : Binary.
mode : Signal.
option : Spied connector.
the signal is separated of the following with 0 blank space.
result :
signal accu.f spy ;
DECLAR ("accu.reg", ":1", "B", REGISTER, "(3)", "");
describes : accu.reg .
format : Binary.
mode : Register.
option : none.
the signal is separated of the following with 1 blank space.
result :
register accu.reg(3) ;;;;
WARNING
The DECLAR function from the 4.0 release have a new parameter (option).
SEE ALSO ARRAY(3), genpat(1), pat(5)BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM /LIP6 October 1, 1997 DECLAR(3)