07-01-2013
Quote:
Originally Posted by
rafa_fed2
i am using bash.
-s checks if file is emty or not?
Again, read the
man bash:
Quote:
-s file
True if file exists and has a size greater than zero.
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear all
That's another problem from me, i wanna do a lot of if statement checking for correct input by user, will be prompt input again if the input not meet the requirement defined by If or while statement...
like this one ....
while
I know it's less effiency write the program... (14 Replies)
Discussion started by: trynew
14 Replies
2. Shell Programming and Scripting
Hi,
i wrote If Conditions in my script, it's returns null and some values.
but i am unable to find when Null value getting. bec we need modification according null vales.
pls help me on this. (2 Replies)
Discussion started by: koti_rama
2 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have a input file with many fields and each filed will be with in double quotes(""). i want to check fields contains balnk,null or space using condition using if. when i write code as below for if condition its not working
a=`awk -F ',' '{gsub("\"", "", $1);'NF==0';printf $1}'... (3 Replies)
Discussion started by: jayakumarrt
3 Replies
4. Shell Programming and Scripting
Dear All,
I'm glad that I've also joined in this forum. Good work fellas... :b:
Keep going...! :)
I am having a .csv file where I am reading the values with comma(,) as delimiter. After reading each and every values, I would like to check whether it is empty (say null or blank spaces). How... (4 Replies)
Discussion started by: ganapathi.t
4 Replies
5. Programming
void disptree(node *ptr)
{
if ((ptr->left) !=NULL)
disptree(ptr->left);
cout<<"Position:"<<ptr->pos<<" Data:"<<ptr->data<<endl;
if ((ptr->right)!=NULL;
disptree(ptr->right);
}
i'm getting a segmentation fault at the red line. i cannot understand what's the problem.... (3 Replies)
Discussion started by: vijaymrt
3 Replies
6. Programming
Hello All,
I have this question that how to check for an array for NULL?
For eg.
#include<iostream.h>
using namespace std;
int main()
{
char arr;
if(arr == NULL)
{
cout<<"NULL";
}
}
Thanks a lott in advance!!! (3 Replies)
Discussion started by: mind@work
3 Replies
7. Shell Programming and Scripting
Hi I need to check the output of a string to null. For eg the output I get for $KIT is empty. So want to echo something when the output is empty.
How can I do that?
Thanks in advance (6 Replies)
Discussion started by: Ananthdoss
6 Replies
8. Shell Programming and Scripting
Hi,
I have a file abc.txt as
ABC,TYU,1.2566
AHG,GJJ,1.898
hgh,FGA,1.854
My program is reading each line and storing the values variables base_cy, quo_cy, ra_amt
Need to validate each of them as in:
base_cy and quo_cy should be a 3 character alphabet among A-Z, if it is lower case ... (1 Reply)
Discussion started by: infyanurag
1 Replies
9. Shell Programming and Scripting
i have a script where i have to find the age of a file,
if
then
echo "dnb file is present for the monthly load" >> $RUNLOG
dnb="1"
else
echo "dnb file has not arrived yet" > $ERRLOG
dnb="0"
fi
i know the file is available so... (3 Replies)
Discussion started by: lovelysethii
3 Replies
10. Shell Programming and Scripting
Guys,
Please help me on the below
sample.cfg
var=NULL
sample.sh
#!/bin/sh
. /sample.cfg
if ;then
1 st command here
else
2 nd command here
fi (3 Replies)
Discussion started by: AraR87
3 Replies
LEARN ABOUT OSF1
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)