Slogan: Today's Bug - Tomorrow's Feature!
Mailing List | Group Email | Blog
EDA Tools | ASIC Zone | EDA Zone | FPGA Zone | IC Industry

News on VLSI

Loading...

VLSICore deals with VLSI design on SoC / ASIC / FPGA design flows. It includes,

  • Digital Logic design, Full-Custom/Semi-Custom design.
  • Microprocessors, DSP, Telecom more.
  • Nano Technology: 90nm, 45nm and beyond.
  • Foundry: TSMC, UMC, CSM, IBM, Tower
  • Standard / IO Cell library preparation, Intellectual Property [Memories, SRAMs, DRAMs, PCI, USB, Audio/Video CODEC], VDSM/UDSM.
  • Verilog, PLI, VHDL, EDIF, System Verilog, SystemC
  • Design Entry, Simulation, Formal Verification, Synthesis.
  • Floorplanning, HF Net Synthesis, Placement, Clock Tree Synthesis, Routing, Physical Verification, RC Extraction, DFM, OPC, Tape-Out.
  • Shell, Perl, Tcl, Tk/Tix, Scheme, C/C++, API, ...
  • Analog design, SPICE, Simulation, RF, PLL, High Speed CMOS, MEMS, ...
  • DFM (Design for Manufacturing)
  • EDA: Synopsys, Cadence, Mentor, Magma, Xilinx, Altera, Atmel, ...
  • Open Source EDA tools, Open Source : ASIC design and technology.

Wednesday, March 10, 2010

How to Search & Replace in 2GB Big Text File?

Problem Statement:
I am trying to edit few lines in a file, but it is a very big file more than 2GB text file. Opening, editing and saving in vi editor takes a long time.

1. To search and replace a string 'STRING' in a big file.

2. To find few lines having string 'GROUPS' and remove them from the original file.I tried 'grep -v 'GROUPS' file > newfile', is there any better way than this.

Is this possible to do without opening a file through other ways not in Vi editor.

Perl Solution
    perl  -e 's/gopher/World Wide Web/gi'  -p  -i.bak  *.html

This command, issued at the Unix prompt, executes the short Perl program specified in single quotes. This program consists of one Perl operation: it substitutes for original word "gopher" the phrase "World Wide Web" (globally, ignoring case). The command line options imply that the Perl program should run for each file ending in .html in the current directory. If any file blah.html needs changing, a backup of the original is made as file blah.html.bak.�


For more info on perl, please go through
http://www.cs.tut.fi/~jkorpela/perl/course.html#whatis

sed solution:
for deleting GROUPS from all lines
use this :
sed -i '/GROUPS/d' file_name
OR
sed 's/old_string/new_string/g' oldfilename > newfilename


Source: VLSICore Members

0 comments: