Sponsored Content
Top Forums Shell Programming and Scripting Remove the footer from a flat file by searching a pattern Post 302560960 by gani_85 on Sunday 2nd of October 2011 02:45:37 PM
Old 10-02-2011
Thanks Ahamed.
But I think your code needs an output file for writing the output. I need to modify the input file as the size of the input file is large.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to remove page breaks from a flat file???

Hi All, I get a flat file with its last field data splitting onto a new line.I got this program from Vgersh which when run would cancatenate the split data back to the end of the previous records.But this program fails when it encounters a page break between the split data and the previous... (5 Replies)
Discussion started by: kumarsaravana_s
5 Replies

2. Shell Programming and Scripting

Adding a footer to a flat file

I wanted to know if there is a way to add a footer to a flat file that is being extracted by a sql query. so if the query extracts 1000 rows, in the flat file it appends the last line as 1000. Is there a way to do so? Thanks (1 Reply)
Discussion started by: rudoraj
1 Replies

3. UNIX for Dummies Questions & Answers

how to remove the first line from a flat file ?

Hi, I want to remove the first line from a flat file using unix command as simple as possible. Can anybody give me a hand ? Thanks in advance. xli (21 Replies)
Discussion started by: xli
21 Replies

4. Shell Programming and Scripting

Searching a pattern in file and deleting th ewhole line containing the pattern

Hi All, Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern. #!bin/sh # The pattern that user want to add to the files echo "Enter the pattern of the redirect" read value # check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies

5. Shell Programming and Scripting

Searching for Log / Bad file and Reading and writing to a flat file

Need to develop a unix shell script for the below requirement and I need your assistance: 1) search for file.log and file.bad file in a directory and read them 2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file 4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies

6. Shell Programming and Scripting

Remove somewhat Duplicate records from a flat file

I have a flat file that contains records similar to the following two lines; 1984/11/08 7 700000 123456789 2 1984/11/08 1941/05/19 7 700000 123456789 2 The 123456789 2 represents an account number, this is how I identify the duplicate record. The ### signs represent... (4 Replies)
Discussion started by: jolney
4 Replies

7. UNIX for Dummies Questions & Answers

How to remove numeric characters in the flat file

HI, can any one help me please .. i have flat file like qwer123rt ass3242ccf jjk654 kjh838ppp nhdg453ok hdkk34 i want remove numeric characters in the flat file i want output like this qwerrt assccf jjk kjhppp nhdgok hdkk help me... (4 Replies)
Discussion started by: rafimd1985
4 Replies

8. Shell Programming and Scripting

Searching for pattern and remove the lines

Hi , I want to remove the specific pattern and remove those lines from file using shell script. i want to remove these lines <?xml version='1.0' encoding='UTF-8'?> <row_set> </row_set> my input file has content like this. file name: sample.xml <?xml version='1.0'... (4 Replies)
Discussion started by: nukala_2
4 Replies

9. UNIX for Advanced & Expert Users

Remove duplicates in flat file

Hi all, I have a issues while loading a flat file to the DB. It is taking much time. When analyzed i found out that there are duplicates entry in the flat file. There are 2 type of Duplicate entry. 1) is entire row is duplicate. ( i can use sort | uniq) to remove the duplicated entry. 2) the... (4 Replies)
Discussion started by: samjoshuab
4 Replies

10. Shell Programming and Scripting

Remove first NULL Character in Flat File

We have a flat file with below data : ^@^@^@^@00000305^@^@^@^@^@^@430^@430^@^@^@^@^@^@^@^@^@09079989530As we can see ^@ is Null character in this file I want to remove only the first few null characters before string 00000305 How can we do that, any idea. I want a new file without first few... (5 Replies)
Discussion started by: simpltyansh
5 Replies
pnmhistmap(1)						      General Commands Manual						     pnmhistmap(1)

NAME
pnmhistmap - draw a histogram for a PGM or PPM file SYNOPSIS
pnmhistmap [-black] [-white] [-max N] [-verbose] [pnmfile] DESCRIPTION
Reads a portable anymap as input, although bitmap (PBM) input produces an error message and no image. Produces an image showing a his- togram of the color (or gray) values in the input. A graymap (PGM) input produces a bitmap output. A pixmap (PPM) input produces pixmap output with three overlaid histograms: a red one for the red input, a green one for the green input, and a blue one for the blue input. The output is fixed in size: 256 pixels wide by 200 pixels high. OPTIONS
-black Ignores the count of black pixels when scaling the histogram. -white Ignores the count of white pixels when scaling the histogram. The -black and -white options, which can be used seperately or together, are useful for images with a large percentage of pixels whose value is zero or 255, which can cause the remaining histogram data to become unreadbaly small. Note that, for pixmap inputs, these options apply to all colors; if, for example, the input has a large number of bright-red areas, you will probably want to use the -white option. -max N Force the scaling of the histogram to use N as the largest-count value. This is useful for inputs with a large percentage of sin- gle-color pixels which are not black or white. -verbose Report the progress of making the histogram, including the largest-count value used to scale the output. All flags can be abbreviated to their shortest unique prefix. BUGS
Assumes maxval is always 255. Images with a smaller maxval will only use the lower-value side of the histogram. This can be overcome either by piping the input through "pnmdepth 255" or by cutting and scaling the lower-value side of the histogram. Neither is a particu- larly elegant solution. Should allow the output size to be specified. SEE ALSO
pgmhist(1), ppmhist(1), pgm(5), ppm(5) AUTHOR
Wilson H. Bent. Jr. (whb@usc.edu). 25 October 1993 pnmhistmap(1)
All times are GMT -4. The time now is 01:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy