Condition to check whether configuration file is empty or not?
The above is the code of my script which I am using to fetch the source code of checkpoint label from the MKS tool.Here I want some help to enhance my script ...like to add one more functionality
.IF you see at the top of the code CMD variable is looking for one of the configuration file ..._release.txt.and store that.after that in for loop it is reading the value in CMD varibale i.e. the value
which is in the configuration file and using that value to checkout the source code of that checkpoint lable so ultimately the value in configuration file is checkpoint label.I want your help here
to solve one of my problem i.e. I want if the configuration file is empty then it should display or print that file is blank..I want to know here any condition through which we can check that file is empty or not
like value of i is null
Hi,
May I know how to check for empty file in Perl.
Iam missing something, somewhere.
#!/usr/bin/perl
my $open_dir = '/path/';
my $file;
my $ma = "abc_.*.\.psv\$"
opendir(VAR, $open_dir) or die "Can't open $oepn_dir: $!\n";
while( defined ($file = readdir VAR) ) #read all... (1 Reply)
Hi Masters.....
I have problem !!!
I need to check number of records in a file and if it is zero or file is empty i need to do some task.
if ; then
echo "File s empty"
else
echo "Not empty"
fi
so how to check this condition.
I used wc -l < filename.txt => 1 for zero records
same result... (1 Reply)
Hi All,
I am new to unix worldd .
I need to check a file1 if its empty or not.
If its empty then return a non zero value say 99
could you pls let me know the perl script for this. (2 Replies)
How do I check if a file is empty in a sh script
I want to test in my shell script if the output file is empty and if it is do one thing and if it isnt empty do another?
any ideas? (8 Replies)
I am running a C shell script. I have an output file from a previous step and I need to run "something" in the next step to check if the file is empty. If the file is empty, then the job script should finish EOJ. If the file is not empty then the job script should abend.
Please help
Thanks. (4 Replies)
Hello,
I want to make a script which says if a text file is empty or not.
I tried two ways of making it, but I have problems with both of them.
Now I think that the better way is the ls -s solution (considering that an empty text file has a 0 weight, because "cat file.txt" fails when file is... (4 Replies)
Hello again!
I have some trouble with scripting in bash.
In the following script I read from a folder with the files
line0_Ux.xy
line1_Ux.xy
line2_Ux.xy
.
.
.
Some of the files are empty. For those I would like to print a "0" in list.
I think the problem with the code is that... (4 Replies)
Hi gurus ,
I have two files and i want to perform different action based on the condition if both or either is empty
If
then
Do something
elif
then
do something
elif
then
do something
else
do something
fi
I have tried the below bt its not... (4 Replies)
Hi,
I am using KSH.
I am trying to check if the output file is empty or not.
I tried with ] but what i see is my file is empty but still manages to have a size of 1 instead of 0.
But my file doesnot have anything its empty.
I am not sure how to check this.
can any one help? (10 Replies)
Hi All,
I need to check a file whether it exists and also whether it is empty or not. I have a code for this but it is not working as per my requirement. Can anyone pls suggest me on this.
function funcFLSanityCheck
{
if
then
echo "${varFLSentFileListPath}/${varFLSentFileName}... (7 Replies)
Discussion started by: Arun1992
7 Replies
LEARN ABOUT MINIX
ppmtosixel
ppmtosixel(1) General Commands Manual ppmtosixel(1)NAME
ppmtosixel - convert a portable pixmap into DEC sixel format
SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC
LJ250 color inkjet printer.
If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table
begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file.
OPTIONS -raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com-
pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni-
tude larger than a compressed file and prints much slower.
-margin
If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci-
fied, a 1.5 inch left margin will offset the image.
PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was
greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the
color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation.
SEE ALSO ppm(5)AUTHOR
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)