12-29-2009
Hi radoulov,
Exactly what I was looking for, thanks!
Regards,
Willem.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
I have the following input in file:
abc
ab
a
AB
b
c
a
C
B
When I use uniq -u file,the out put file is:
abc
ab
AB
c
v
B
C (17 Replies)
Discussion started by: hellsd
17 Replies
2. Shell Programming and Scripting
Hi
I use sed in a script for severall changes in files. I whish one of the substitutions I made to be aplied to every line that has the word "scripts" with the exception for the ones that start with "rsh", wich I wish sed to ignore . Is this possible? If yes, how can I do it?
The substitution... (2 Replies)
Discussion started by: Scarlos
2 Replies
3. Shell Programming and Scripting
Is there a standard way to make a shell script read a file, or list, and skip each line that contains # at the begining, or ignores the content starting after a # in line?
I'm looking to mimic the way commenting in a shell script normally works. This way I can comment my text files and lists my... (4 Replies)
Discussion started by: sysera
4 Replies
4. Shell Programming and Scripting
From the below file I want to grep only the lines except the comment sections. But grep -v "#" is eliminating the last line because it has one # in between.
Any idea how can I ignore only the lines which have # at the begining (I mean comment lines) ?
Thanks a lot to all in advance
C Saha (1 Reply)
Discussion started by: csaha
1 Replies
5. Shell Programming and Scripting
Is there a way to tell awk to ignore the first 11 lines of a file?? example, I have a csv file with all the heading information in the first lines. I want to split the file into 5-6 different files but I want to retain the the first 11 lines of the file.
As it is now I run this command:
... (8 Replies)
Discussion started by: trey85stang
8 Replies
6. Shell Programming and Scripting
Hello Experts,
I have two files called "old" and "new". My old file contains 10 lines and my new file contains 10 + "n" lines.
The first field in both these files contain ID. I sort these two files on ID. I am interested in only the lines that are in the new file and not in old.
I tried... (4 Replies)
Discussion started by: forumthreads
4 Replies
7. Shell Programming and Scripting
Hi,
Please provide shell script to Remove empty lines(space) between two lines containing strings in a file.
Input File :
A1/EXT "BAP_BSC6/07B/00" 844 090602 1605
RXOCF-465 PDTR11 1
SITE ON BATTERY
A2/EXT... (3 Replies)
Discussion started by: sudhakaryadav
3 Replies
8. Shell Programming and Scripting
Hi,
i am having one text file it contains some blank lines and i want to ignore that blank lines .
#! /bin/bash
clear
rdCount=0;
while read myline
do
echo $myline
let rdCount=$rdCount+1
done < ps.txt
echo "Total line=$rdCount"
and ps .txt contains the data- (17 Replies)
Discussion started by: aish11
17 Replies
9. Shell Programming and Scripting
Hi,
I have a shell script, which reads a *.txt file - line by line. In this text file, I have some lines beginning with "#" that I want to ignore :
MY_FILE
#blah blah blah 1
blah blah blah 2
blah blah blah 3
#blah blah blah 4
I want my script to read only the following lines... (3 Replies)
Discussion started by: ad23
3 Replies
10. Shell Programming and Scripting
Hi - I have req to join broken lines and remove empty lines but should NOT be in one line. It has to be as is line by line. The challenge here is there is no end of line/start of line char.
thanks in advance
Source:-
2003-04-34024|04-10-2003|Claims|Claim|01-13-2003|Air Bag:Driver;... (7 Replies)
Discussion started by: Jackceasar123
7 Replies
LEARN ABOUT REDHAT
pngtopnm
pngtopnm(1) General Commands Manual pngtopnm(1)
NAME
pngtopnm - convert a Portable Network Graphics file into a portable anymap
SYNOPSIS
pngtopnm [-verbose] [-alpha | -mix] [-background color]
[-gamma value] [-text file] [-time] [pngfile]
DESCRIPTION
Reads a Portable Network Graphics as input. Produces a portable anymap as output. The type of the output file depends on the input file -
if it's black & white, a pbm file is written, else if it's grayscale a pgm file, else a ppm file.
OPTIONS
-verbose
Display the format of the input file and the type of the output file. If the chunks are part of the png-file, the alpha, trans-
parency and gamma-values will be indicated.
-alpha Output the alpha channel or transparency mask of the image. The result is either a pbm file or pgm file, depending on whether dif-
ferent levels of transparency appear.
-mix Compose the image with the transparency or alpha mask against a the background. When a background chunk is available that color is
taken, else black will do.
-background color
If no background color chunck is present in the png-file, or when another color is required this parameter can be used to set the
background color of images. This is especially useful for alpha-channel images or those with transparency chunks. The format, to
specify the color in, is either (in the case of orange) "1.0,0.5,0.0", where the values are floats between zero and one, or with the
syntax "#RGB", "#RRGGBB" or "#RRRRGGGGBBBB" where R, G and B are hexa-decimal numbers.
-gamma value
Converts the image to a new display-gamma value. When a gAMA chunk is present in the png-file, the image-gamma value will be used.
When not, the image-gamma is considered to be 1.0. Based on the image-gamma and the display-gamma given with this option the colors
written to the pnm-file will be adjusted.
Because the gamma's of uncompensated monitors are around 2.6, which results in an image-gamma of 0.45, some typical situations are:
when the image-gamma is 0.45 (use -verbose to check) and the picture is too light, your system is gamma-corrected, so convert with
"-gamma 1.0". When no gAMA chunk is present or the image-gamma is 1.0, use 2.2 to make the picture lighter and 0.45 to make the
picture darker.
-text file
Writes the tEXt and zTXt chunks to a file, in a format as described in the pnmtopng man-page. These chunks contain text comments or
annotations.
-time Prints the tIME chunk to stderr.
All flags can be abbreviated to their shortest unique prefix.
SEE ALSO
pnmtopng(1), ptot(1), pnmgamma(1), pnm(5)
NOTE
Instead of pngtopnm|pnmtoxxx, a specific converter should be used, if available. E.g. ptot (PNG to TIFF conversion), etc.
BUGS
There could be an option to read the comment text from pnm comments instead of a separate file.
The program could be much faster, with a bit of code optimizing.
AUTHORS
Copyright (C) 1995-1997 by Alexander Lehmann
and Willem van Schaik.
6 January 1997 pngtopnm(1)