Sponsored Content
Top Forums Shell Programming and Scripting Splitting a file and creating new files using Perl script Post 302823429 by Deepak9870 on Wednesday 19th of June 2013 09:47:41 AM
Old 06-19-2013
Hi Pravin,

I ran that code given by you, it provided me four splitting files. Two files without below headings.

Code:
Sourcename ID Date Nbr

Another file with only this heading and one blank text file.

But I need this heading in the two splitted files.

Can you help me on this ?

-Deepak
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating loop for a script -Perl

Hi Guyz I designed a script that can compare 2 columns(values) of single file and gives the closest numbers to the first column by comparing the numbers in first column with second and it works in a single file. Now I'm trying to design a new script with 2 objectives for 2 files (not a single... (4 Replies)
Discussion started by: repinementer
4 Replies

2. Shell Programming and Scripting

Splitting files from one file

Hi, I have an input file like: 111 abcdefgh asdfghjk dfghjkl 222 aaaaaaa bbbbbb 333 djfhfgjktitjhgfkg 444 djdhfjkhfjkghjkfg hsbfjksdbhjkgherjklg fjkhfjklsahjgh fkrjkgnj I want to read this input file and make separate output files with the header as numric value like "111"... (9 Replies)
Discussion started by: saltysumi
9 Replies

3. Shell Programming and Scripting

Splitting the files via shell script

Hi all, We have 102 flat files created by Informatica from 102 tables. These 102 files contain pharmcy details. There are a total of 450 pharmcyids.The naming convention for the flat file is ODS_<TABLE NAME>_yyyymmdd_timestamp.dat. Each flat file may contain data for 450 pharmacies which is... (2 Replies)
Discussion started by: Maya_Pillai
2 Replies

4. Shell Programming and Scripting

Splitting file into 2 files ?

Hi extending to one of my previous posted query .... I am using nawk -v invar1="$aa" '{print > ("ABS\_"((/\|/)?"A\_":"B\_")invar1"\_NETWORKID.txt")}' spfile.txt to get 2 different files based on split condition i.e. "|" Similar to invar1 variable in nawk I also need one more variable... (18 Replies)
Discussion started by: shekharjchandra
18 Replies

5. Shell Programming and Scripting

Data Splitting into two files from one file

I have a file as: I/P File: Ground Car 2009 Lib 2008 Lib 2003 Ground Car 2009 Ground Car 2003 Car 2005 Car 2003 Car 2005 Sita 2900 2006 Car 2007 I have to split the file into two: - one for names and second for years. O/p1 (Names): Ground Car (3 Replies)
Discussion started by: karumudi7
3 Replies

6. UNIX for Advanced & Expert Users

Splitting a file into small files

Hi Folks, Please help me in solving the problem. I want to write script in order to split a file into small pieces and send it automatically through mail. Ex. The file name is CALM*.txt . It is around 50 MB. I want to split the file into 20 MB 2-3 smaller files and send (like uuencode) it... (6 Replies)
Discussion started by: piyushbhashkar
6 Replies

7. Shell Programming and Scripting

Splitting a file into several smaller files using perl

Hi, I'm trying to split a large file into several smaller files the script will have two input arguments argument1=filename and argument2=no of files to be split. In my large input file I have a header followed by 100009 records The first line is a header; I want this header in all my... (9 Replies)
Discussion started by: ramky79
9 Replies

8. Shell Programming and Scripting

Splitting xml file into several xml files using perl

Hi Everyone, I'm new here and I was checking this old post: /shell-programming-and-scripting/180669-splitting-file-into-several-smaller-files-using-perl.html (cannot paste link because of lack of points) I need to do something like this but understand very little of perl. I also check... (4 Replies)
Discussion started by: mcosta
4 Replies

9. Shell Programming and Scripting

Script for splitting file of records into multiple files

Hello I have a file of following format HDR 1234 abc qwerty abc def ghi jkl HDR 4567 xyz qwerty abc def ghi jkl HDR 890 mno qwerty abc def ghi jkl HDR 1234 abc qwerty abc def ghi jkl HDR 1234 abc qwerty abc def ghi jkl -Need to split this into multiple files based on tag... (8 Replies)
Discussion started by: wincrazy
8 Replies

10. UNIX for Beginners Questions & Answers

Creating script to read many files and load into database via single control file

Hi, I have many files but with only 2 names , I want to load the data of that file into database through sqlldr with single control file. how can i do that ????? Example: switch_file switch_file billing_file billing_file now these files should be loaded into same database but different... (1 Reply)
Discussion started by: niti_sharma
1 Replies
GROHTML(1)						      General Commands Manual							GROHTML(1)

NAME
grohtml - html driver for groff SYNOPSIS
grohtml [ -bhlnprv ] [ -aaa-text-bits ] [ -Ddir ] [ -Fdir ] [ -gaa-graphic-bits ] [ -iresolution ] [ -Iimage-stem ] [ -jfilename ] [ -oimage-vertical-offset ] [ -ssize ] [ -Slevel ] [ files... ] DESCRIPTION
The grohtml front end (which consists of a preprocessor, pre-grohtml, and a device driver, post-grohtml) translates the output of GNU troff to html. Users should always invoke grohtml via the groff command with a -Thtml option. If no files are given, grohtml will read the standard input. A filename of - will also cause grohtml to read the standard input. Html output is written to the standard output. When grohtml is run by groff options can be passed to grohtml using groff's -P option. OPTIONS
-aaa-text-bits Number of bits of antialiasing information to be used by text when generating png images. The default is 4 but valid values are 0, 1, 2, and 4. Note your version of gs needs to support the -dTextAlphaBits and -dGraphicAlphaBits options in order to exploit antialiasing. A value of 0 stops grohtml from issuing antialiasing commands to gs. -b Initialize the background color to white. -Ddir Inform grohtml to place all image files into directory dir. -Fdir Prepend directory dir/devname to the search path for font and device description files; name is the name of the device, usually html. -gaa-graphic-bits Number of bits of antialiasing information to be used by graphics when generating png images. The default is 4 but valid values are 0, 1, 2, and 4. Note your version of gs needs to support the -dTextAlphaBits and -dGraphicAlphaBits options in order to exploit antialiasing. A value of 0 stops grohtml from issuing antialiasing commands to gs. -h Generate section and number headings by using <B>...</B> and increasing the font size, rather than using the <Hn>...</Hn> tags. -iresolution Select the resolution for all images. By default this is 100 pixels per inch. Example: -i200 indicates 200 pixels per inch. -Istem Determine the image stem name. If omitted grohtml uses grohtml-XXX (XXX is the process ID). -jfilename Inform grohtml to split the html output into multiple files. The filename is the stem and specified section headings (default is level one) start a new file, named filename-n.html. -l Turn off the production of automatic section links at the top of the document. -n Generate simple heading anchors whenever a section/number heading is found. Without the option the anchor value is the textual heading. This can cause problems when a heading contains a `?' on older versions of some browsers (Netscape). This flag is auto- matically turned on if a heading contains an image. -overtical-offset Specify the vertical offset of images in points. -p Display page rendering progress to stderr. grohtml only displays a page number when an image is required. -r Turn off the automatic header and footer line (html rule). -s size Set the base point size of the source file. Thereafter when this point size is used in the source it will correspond to the html base size. Every increase of two points in the source will yield a <big> tag, and conversely when a decrease of two points is seen a <small> tag is emitted. -Slevel When splitting html output, split at the heading level (or higher) defined by level. -v Print the version number. USAGE
There are styles called R, I, B, and BI mounted at font positions 1 to 4. DEPENDENCIES
grohtml is dependent upon the png utilities (pnmcut, pnmcrop, pnmtopng) and GhostScript (gs). pnmtopng (version 2.37.6 or greater) and pnmcut from the netpbm package (version 9.16 or greater) will work also. It is also dependent upon psselect from the PSUtils package. Images are generated whenever a table, picture, equation or line is encountered. BUGS
Grohtml has been completely redesigned and rewritten. It is still beta code. SEE ALSO
afmtodit(1), groff(1), troff(1), psbb(1), groff_out(5), groff_font(5), groff_char(7) Groff Version 1.19.2 24 November 2004 GROHTML(1)
All times are GMT -4. The time now is 03:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy