Sponsored Content
Top Forums Shell Programming and Scripting Requirement of Spliting a text file in UNIX Programing Post 302891137 by Chandra2678 on Tuesday 4th of March 2014 05:22:39 AM
Old 03-04-2014
Requirement of Spliting a text file in UNIX Programing

Hi,

There is a requirement, needs to split the text file based on RC code present in text file.
For this, needs to write a unix shell programing script for the above requirement.

For example in text file, if there are distinct RC codes, then we needs to split into multiple text files. In this text file RC codes(9102 and 9103) are to be split in to 2 separate files.

Please find attached is the text file.

Could you please help me to get complete program logic for this requirement.

If you need more info please let me know.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

system requirement for unix

I want to try running the free down load from sun, their solaris 8. I have an intel pentium 3, 550 mhz, 8 GB drive, with 128 ram. I this anough to run a unix os like solaris 8. Also is their a browser that I could use with solaris8 so as to connect to the internet. Does ie have a version for unix.... (3 Replies)
Discussion started by: gparsons70
3 Replies

2. UNIX for Dummies Questions & Answers

spliting up a huge file

I have a file {filename} which contains 65000 records I need to split into 6 smaller files roughly 11000 records each. Can someone advise me of the Unix command to do so ? Many thanks (2 Replies)
Discussion started by: grinder182533
2 Replies

3. Programming

creating GUI using C programing in unix server

I want to write GUI using C programing in Unix server. But I can not use windows.h header file. I want to create some text box using C programing. Please suggest me any sample code or tutorial for this purpose. I do not know any thing about GUI programing in C language. Thanks in... (5 Replies)
Discussion started by: rinku
5 Replies

4. UNIX for Dummies Questions & Answers

spliting a file

how would i split the file "file1" into smaller files containg lines of 15 (1 Reply)
Discussion started by: JamieMurry
1 Replies

5. Shell Programming and Scripting

File Spliting problem

I have a very big log file which looks like this: I need to split this file and create files with "+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+" as the delimiter. The file names need to be the contents of the next line after the delimiter(FIRST_ITEM,SECOND_ITEM...so on..). (7 Replies)
Discussion started by: engineer
7 Replies

6. Shell Programming and Scripting

spliting up a large file

Dear All, I have a very large file which which i would like split into indvidual frames evrytime the line ends with "ENDMDL" and then name frame1.pdb frame2.pdb etc can any one give me a few sugeestions? ideally i would like to have ENDMDL at the end of each frame or not pressent at all. an... (4 Replies)
Discussion started by: Mish_99
4 Replies

7. Shell Programming and Scripting

mailx requirement - email body header in bold and data content in normal text

Dear all- I have a requirement to send an email via email with body content which looks something below- Email body contents -------------------- RequestType: Update DateAcctOpened: 1/5/2010 Note that header information and data content should be normal text.. Please advice on... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies

8. IP Networking

Help with Unix socket programing

hi I am strucked in a client server program client need to login to server client logins if only username and password are correct i have written a program username is stored as file and password is smilar to username whic is stored in that file when server asks for username... (2 Replies)
Discussion started by: karthik1238
2 Replies

9. Shell Programming and Scripting

UNIX - requirement

Hi All, I have a source file with data Name ~ Groups Muni~abc,was,USA_ax,123 Chaitanya~USA_12,was Balaji~123,xyz,was Ramu~123,xyz From the second column i want to extract only the groups that matches the pattern 'USA_%' or if the group = 'was', and ignore any other columns. ... (8 Replies)
Discussion started by: morbid_angel
8 Replies

10. UNIX for Beginners Questions & Answers

UNIX requirement

Hi Everyone, Can anyone of you help me on how to get files creation time on ftp server/Remote server in unix. Regards, Avinash. (6 Replies)
Discussion started by: Avinash varma
6 Replies
EditFiles(3pm)						User Contributed Perl Documentation					    EditFiles(3pm)

NAME
Verilog::EditFiles - Split Verilog modules into separate files. SYNOPSIS
See splitmodule command. use Verilog::EditFiles; my $split = Verilog::EditFiles->new (outdir => "processed_rtl", translate_synthesis => 0, lint_header => undef, celldefine => 1, ); $split->read_and_split(glob("inbound_rtl/*.v")); $split->write_files(); $split->edit_file(filename=>"foo", cb => sub { return $_[0]; }); DESCRIPTION
Verilog::EditFiles provides a easy way to split library Verilog files that contain multiple modules into many files with one module per file. FUNCTIONS
new (...) Create a new Verilog::EditFiles object. Named parameters may be specified: celldefine If true, add "`celldefine" before every module statement. lint_command For the write_lint method, the name of the linter to use. Defaults to "vlint --brief". lint_header If defined, add the provided text before every module statement. Generally used to insert lint off pragmas. outdir Name of the directory to write the output modules to. Defaults to ".". program Name of the program to add to comments. Defaults to "Verilog::EditFiles". timescale_header If defined, add the provided text before every module statement. Generally set to the next needed to #include a timescale file. Use with timescale_removal. timescale_removal If set, remove any `timescales. translate_synthesis If 1, replace any synopsys translate on/offs with "`ifdef SYNTHESIS" and "`endif"s. If set to a string, use that string instead of "SYNTHESIS". v_suffix The suffix to add to convert a module name into a filename. Defaults to ".v". verbose If true, print what files are being read and written. $self->read_and_split ([filenames]) Read from the specified filenames. If there is no module statement in the file, assume it is a include file, and when write_files is called, place all of the file contents into the output. If there is a module statement, when write_files is called place all following output into a file named based on the module, with .v added. $self->write_files() Write all of the files created by read_and_split to the outdir. $self->write_lint([filename=>...]) Create a shell script that will lint every file created by write_files. If a "filename" parameter is not provided, "0LINT.sh" will be written in the default outdir. $self->edit_file(filename=>..., cb=>sub{...}) Read a file, edit it with the provided callback, and save it if it has changed. The "filename" parameter is the filename to read. The "write_filename" parameter is the filename to write, defaulting to the same name as the filename to read. The "cb" parameter is a reference to a callback which takes the string of file contents and returns the string to write back. Often the callback will simply perform a search and replace. DISTRIBUTION
Verilog-Perl is part of the <http://www.veripool.org/> free Verilog EDA software tool suite. The latest version is available from CPAN and from http://www.veripool.org/verilog-perl <http://www.veripool.org/verilog-perl>. Copyright 2006-2012 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0. AUTHORS
Wilson Snyder <wsnyder@wsnyder.org> SEE ALSO
Verilog-Perl perl v5.14.2 2012-05-04 EditFiles(3pm)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy