Sponsored Content
Top Forums Shell Programming and Scripting copy the contents between two keywords to a new file. Post 302363228 by naveen@ on Monday 19th of October 2009 06:11:57 PM
Old 10-19-2009
Network copy the contents between two keywords to a new file.

Hi All,

I want to edit my gate level netlists by searching for the content between two patterns

eg:

ff1 \test/a0 ( .CLK(\test/ClkInt0_acb_00x1 ),.D(\test/Rakicc ), .QB(\test/X [1]), .VDD(1'b1), .VSS(1'b0));
ff1 \test/a1 ( .CLK(\test/medis0_acb_00x1 ),.D(\test/hedwc ), .QB(\test/X [1]), .VDD(1'b1), .VSS(1'b0));
ff1 \test/a2 ( .CLK(\test/tergus_acb_00x1 ),.D(\test/Ddec ), .QB(\test/X [1]), .VDD(1'b1), .VSS(1'b0));
.....
.....

i need to grep the contents after ".CLK(" and before "),.D" and copy it to a new file.

Kindly help me with this.

Thanks a bunch
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
mbk2eagle     01/07/2002 ________________________

Cet  outil  permet, a partir d'une description structurelle d'une
carte (.vst), de generer un fichier script utilisable  par  Eagle
(logiciel  de routage de cartes).  Ce fichier permet de fournir a
Eagle, la liste des composants utilises ainsi que  l'interconnex-
ion de ces composants.

La  description  structurelle doit etre completee par trois types
de fichiers.  - Un fichier ";nom__de_figure.pin"  correspondant	a
la description des connexions de
  la  carte  circuit imprime, avec son environnement (connecteurs
de la carte).  - Un ou plusieurs fichiers ";composants.pin" corre-
spondants aux differents modeles de
  composants  qui doivent etre implantes sur la carte circuit im-
prime.	- Un fichier "nom__de_figure.cls" dans lequel on  definit
la classe des
  signaux  ainsi  que la rotation et le placement des differentes
instances
  des modeles. Par defaut la classe d'un signal est la classe 0.

Dans les fichiers, les lignes vides ou commencant par # sont  ig-
norees.

1.	 Organisation	  du	 fichier     "nom__de_figure.pin"
________________________________________________

Dans ce fichier on doit placer,  pour  chaque  connecteur  de  la
carte, les 2 rubriques dans l'ordre :

Rubrique  1  ----------  /MODELE  <instance>  <modele> <rotation>
<(coordonnees)>

<instance> correspond au nom d'instance du connecteur.

<modele> correspond au nom du fichier  Eagle  decrivant  le  con-
necteur. Il est de la forme : nom_modele@nom_bibliotheque

<rotation> On peut mettrel'une des valeurs : R0, R90, R180, R270.

<(coordonnees)>  position provisoire du connecteur (x y). Il doit
etre entierement dans la zone utilisable actuellement 100x160 mm.

Rubrique 2 ---------- /CONNECTEURS

On enumere les signaux du connecteur a	raison	d'un  signal  par
ligne, sous la forme :

<repere de broche> <nom du signal>

EXEMPLE
/MODELE P1 IBM8BIT@con-pc R90 (6.5 0.5) /CONNECTEURS B1 VSS B3 VDD B29 VDD B31 VSS A2 DATA(7) A3 DATA(6) A4 DATA(5) A5 DATA(4) A6 DATA(3) A7 DATA(2) A8 DATA(1) A9 DATA(0) A11 AEN 2. Organisation des fichiers "composants.pin" ______________________________________________ Dans ce fichier doit placer 2 rubriques dans l'ordre : Rubrique 1 ---------- /MODELE <modele> <modele> correspond au nom du fichier Eagle decrivant le connecteur. Il est de la forme : nom_modele@nom_bibliotheque Rubrique 2 ---------- /CONNECTEURS On enumere les signaux du composant sous la forme : <repere de broche> <nom du signal> EXEMPLE
/MODELE DIL08@dil (0.5 3.0) /CONNECTEURS 1 DATA 2 CLK 3 OE_N 4 CE_N 5 VSS 6 CEO 7 VPP 8 VDD 3. Organisation du fichier "nom__de_figure.cls" ________________________________________________ Dans ce fichier doit placer 2 rubriques dans l'ordre : Rubrique 1 ---------- /CLASS On enumere ensuite les signaux avec leur numero de classe, a rai- son d'un signal par ligne, sous la forme : <nom du signal> <numero de la classe> Inutile d'enumerer les signaux de classe 0. Cette rubrique peut etre vide, mais il doit y avoir ";/CLASS". Rubrique 2 ---------- /PLACEMENT On enumere ensuite les instances avec la rotation a effectuer et les coordonnees de placement, a raison d'une instance par ligne, sous la forme : <nom de l'instance> <rotation> <coordonnees> <rotation> On peut mettrel'une des valeurs : R0, R90, R180, R270. <(coordonnees)> position provisoire du composant (x y). Il doit etre entierement dans la zone utilisable de la carte, actuellement 100x160 mm. EXEMPLE
/CLASS CLK 1 VSS 2 VDD 2 /PLACEMENT IC1 R90 (4.25 1.2) IC2 R180 (3.25 1.2) IC3 R0 (3.25 1.4) 4. Ligne de commande _________________ m2e [-v n ] [-o output] figure -v definit le niveau des messages affiches ; par defaut 1 si 0 : affiche seulement les erreurs si 1 : af- fiche les erreurs et les warning si 2 : affiche en plus les noms des fichiers .pin utilises si 3 : mode trace pour le debug 5. Variable d'environnement ________________________ M2E_PIN_LIB doit etre definie. Elle donne les chemins d'acces aux fichiers .pin
All times are GMT -4. The time now is 09:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy