Sponsored Content
Top Forums Shell Programming and Scripting copy the contents between two keywords to a new file. Post 302363250 by naveen@ on Monday 19th of October 2009 08:49:05 PM
Old 10-19-2009
Data part two of the problem i Have

thanks a lot danmero
i am new to shell scripting. Kindly help me with this if possible.

now that i have my list I need to replace them as follows

Code:
inv in_0 (.A(\test/ClkInt0_acb_00x1 ),.VDD(VDD),.VSS(VSS),.Z(i_0)); 
nand nd2_0 (.A(i_0), .B(VDD),.VDD(VDD),.VSS(VSS),.Z(nd_0));
ff1 \test/a0  ( .CLK(nd_0),.D(\test/Rakicc ), .QB(\test/X [1]), .VDD(1'b1), .VSS(1'b0), .A(tmp_0), .B(tmp_1) ); 

inv in_1 (.A(\test/medis0_acb_00x1 ),.VDD(VDD),.VSS(VSS),.Z(i_1)); 
nand nd2_1 (.A(i_1), .B(VDD),.VDD(VDD),.VSS(VSS),.Z(nd_1));
ff1 \test/a1  ( .CLK(nd_1)),.D(\test/hedwc ), .QB(\test/X [1]), .VDD(1'b1), .VSS(1'b0),.A(tmp_1), .B(tmp_2) );

nv in_2 (.A(\test/tergus_acb_00x1 ),.VDD(VDD),.VSS(VSS),.Z(i_2)); 
nand nd2_2 (.A(i_2), .B(VDD),.VDD(VDD),.VSS(VSS),.Z(nd_2));
ff1 \test/a2  ( .CLK(nd_2)),.D(\test/Ddec ), .QB(\test/X [1]), .VDD(1'b1), .VSS(1'b0),.A(tmp_2), .B(tmp_3) ); 
......
.......

I am using a lengthy workaround. i Initially generate a list using

Code:
#!/bin/bash
i=$1
while [ $i -lt $2 ]; do
j=$(($i+1))
echo "nv in_$i (.A(),.VDD(VDD),.VSS(VSS),.Z(i_$i)); 
 nand nd2_$i (.A(i_$i), .B(VDD),.VDD(VDD),.VSS(VSS),.Z(nd_$i));
(.CLK(nd_$i)),.D(), .QB(), .VDD(1'b1), .VSS(1'b0),.A(tmp_$i), .B(tmp_$j) ); "  >> temp_list.v
i=$(($i+1))
done

and then i manually replace other data. Could anyone help me with an easier workaround please?

Thanks again
Naveen


 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copy selected contents from file

I want to capture contents of a file between 2 strings into another file for eg all lines in between the keywords "start log" and "end log" should be copied into another file (4 Replies)
Discussion started by: misenkiser
4 Replies

2. Shell Programming and Scripting

Automatic Copy of File Contents to Clipboard

Could someone show me how to copy the contents of a file to the clipboard automatically without manually selecting its contents? I just want to press the "Paste Key" to show the results. I wish to use this in a ksh script. I'm using Solaris. Thanks! (5 Replies)
Discussion started by: ilak1008
5 Replies

3. Shell Programming and Scripting

Copy contents of a directory only if a file exists

I'm looking to write a script that will check the contents of a directory, and if any files exist in that directory copy them to a temporary folder. The target files are only resident for a few seconds, so I think the script needs to be running constantly. Any pointers would be really... (3 Replies)
Discussion started by: danceofillusion
3 Replies

4. UNIX for Dummies Questions & Answers

Copy entire contents of file to clipboard

Hi, I am trying to figure out how to copy the contents of a file to the clipboard, then paste into a command. i.e copy contents of file /path/filename.txt to <command> <paste text> Hope that makes sense. Basically tryting to copy the text for use in a command without having to open the... (8 Replies)
Discussion started by: JCA70
8 Replies

5. Shell Programming and Scripting

Need help to copy contents of a file

Hi, I am stuck up with a problem of copying the contents of a directory where one of the folder name is changed daily. Problem: I have the folder structure as: RefWorlds2/LINGCC4_X64/odsdev/odessy/UTI/621GA_build_xxx/.../.. In the above path the build number (xxx) will be changed... (3 Replies)
Discussion started by: SathaKarni
3 Replies

6. Shell Programming and Scripting

copy range of lines in a file based on keywords from another file

Hi Guys, I have the following problem. I have original file (org.txt) that looks like this module v_1(.....) //arbitrary number of text lines endmodule module v_2(....) //arbitrary number of text lines endmodule module v_3(...) //arbitrary number of text lines endmodule module... (6 Replies)
Discussion started by: kaaliakahn
6 Replies

7. Shell Programming and Scripting

Need Script to copy the contents of two files into one file

Hi i need Script to copy the contents of two files into one file i have 2 fil X1.txt / X2.txt i need script to copy the contents of X1 and X2 In AllXfile X1.txt File X1 X2.txt File X2 AllXfile.txt File X1 File X2 (2 Replies)
Discussion started by: azzeddine2005
2 Replies

8. Shell Programming and Scripting

Copy contents of one file to another

I need to write a script (in bash) that copies the content of the first file in each folder of a directory to the second file in the same folder. I tried this and it didn't work - it just came back with errors and I'm not sure how to fix it. Help is very much appreciated! for mpdir in... (4 Replies)
Discussion started by: LeftoverStew
4 Replies

9. UNIX for Dummies Questions & Answers

Copy Lines between Keywords & paste them to another file

hi, I have Multiple files with the following data : File1 100414 DR1 END XXXXX Test1 Test2 Test3 Test4 Test5 Test6 END 100514 DR2 END XXXXX Test7 Test8 Test9 Test10 Test11 Test12 END 100614 DR3 (5 Replies)
Discussion started by: newageBATMAN
5 Replies

10. UNIX for Beginners Questions & Answers

Copy last 30 minutes' contents from a log file

Hi Guys, I am writing a bash script to capture the last 30 minutes's contents from log file to a new file. This job is a scheduled job and will run every 30 minutes. The log file is db2diag.log in DB2. I am having difficulties copying the last 30 minutes's contents. Can someone please help me.... (4 Replies)
Discussion started by: naveed
4 Replies
LVX(1)							      ALLIANCE USER COMMANDS							    LVX(1)

NAME
lvx - Logical Versus eXtracted net-list comparator SYNOPSIS
lvx format1 format2 filename1 filename2 [ -a ] [ -u ] [ -o ] [ -f ] 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 DESCRIPTION
lvx compares two gate-level or block level net-list. The goal is to compare a specification net-list (logical net-list), the input to a place and route tool, with the physical net-list (extracted net-list) obtained by the cougar(1) extractor. The net-list 1 is considered as the logical net-list and net-list 2 as the extracted net-list. lvx is an one-level hierarchical tool: The two net-list are flattened, if the -f option is present, to the cells contained in the catalog file. The path to the catalog file is indicated in the MBK_CATA_LIB(1) variable for the cell library, and in the MBK_WORK_LIB(1) variable with the name MBK_CATAL_NAME(1) for user blocks ( catal(5) ) that are not to be flattened. For both net-list, the instances are considered as black-boxes. The two net-list must have the same external connectors names. The two net-list must have the same instances names. The two net-list must have the same signals names for unconnected signals. The two net-list cannot directly contain transistors. Comparison is performed in three steps: Compare terminals. Compare instances. Compare connections. Compare unconnected signals. If an error occurs during first or second step, a message is immediately displayed and the third step will not start: lvx cannot compare connections (signals) if terminals or instances are not equivalent. The -o option allows to order connectors if the steps described before have been reached successfully. Extracted_netlist is then saved on disk. The file get the name filename2 suffixed by the value of MBK_OUT_LO(1) variable. Routers add automatically empty feed-through cells. These cells must not be taken into account in the comparison. A cell that have the F attribute in the catalog file ( catal (5) ) is considered as feed-through cell, and are deleted, in memory, from the net-list where it appears. OPTIONS
-a Some routers generate layout with several physical connectors for power and ground ( VDD or VSS ). If those connectors are not internally connected, they will have different indexed names ( VDD1 , VDD2 etc...) in the extracted net-list. It is possible to perform reduction on those power and ground connectors before comparison, using the -a option. After reduction, each instance con- tains only one VDD connector and one VSS connector, as the main figure. -o In this case, lvx produces a modified net-list (saved with the name filename2 ), which is a copy of net-list 2 with ordered connec- tors. Terminals and instance connectors are relisted in the order of the models in net-list 1. The saved net-list is done with the MBK_OUT_LO(1) format, so user has to set this variable before running lvx . If he does not, default value is used, and net-list 1 could be lost if filename are identical and input format same as output format. If -a option is used, then the saved net-list is the reduced net-list with only one VDD and one VSS . -u This option force lvx to check the consistency of unassigned signals between the two netlists. -f The two net-lists are flattened to the leaf cells contained in the catalog file. Usually the extracted net-list is a flatten net- list, while the logical one can be a hierarchical net-list. EXAMPLES
With logical_netlist named amd2901.vst and the corresponding extracted_netlist as amd2901.al containing multiple power connectors, the com- mand line is : lvx vst al amd2901 amd2901 -a OUTPUT FILES
filename2.xx Netlist view saved when the -o option is present. The suffixe depend on the MBK_OUT_LO(1) environment variable. ENVIRONMENT VARIABLES
MBK_CATA_LIB contains the directories where the cell librtaries are. MBK_WORK_LIB contains the directory path of the working direc- tory, usually set to . (dot). MBK_OUT_LO contains the expected format of the netlist output. MBK_CATAL_NAME contains the name of the user cell catalog. SEE ALSO
cougar(1), MBK_OUT_LO(1), MBK_WORK_LIB(1), MBK_CATA_LIB(1), MBK_CATAL_NAME(1), catal(5) . DIAGNOSTICS
The string "_logic" is appended to the net-list 1 and the string "_extract", is appended to the net-list 2. Two kinds of error message can occur: A fatal error causes the program to exit. It happens when one of the net-lists is not correct, lvx cannot construct internal struc- ture for compare. A compare error occurs when the figures are not identical. It happens when basic objects (instances, connectors) do not exist in both net-list, or when connections (signals) do not connect same terminals or instances in the two net-lists. Exit code 0 is returned for identical net-lists. 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 LVX(1)
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy