09-03-2013
Yes I did try to debug by printing values of variable and those were printing correct values. And I was using NEW_PRICE everywhere. Sorry for confusion created by mentioning new_price in my post.
My problem is now resolved, after I have added +0 to another operand i.e NEW_PRICE.
Thanks for your help.
10 More Discussions You Might Find Interesting
1. Programming
hi people,
I have a function which I am passing a stream which is basically postfix notation
if(isdigit(in.peek()))
{
in >> number;
nums.push(number);
}
else if (strchr("+-*/", in.peek( )) != NULL)
{
in >> symbol;
do_operation(symbol, nums, okay);
}
... (1 Reply)
Discussion started by: Darklight
1 Replies
2. Shell Programming and Scripting
Hi,
I want to search for a return code of -3. Using grep "-3" *.* is giving a syntax error. Please suggest as to how can we search for this pattern using grep.
Thanks,
Krishna (2 Replies)
Discussion started by: kzmatam
2 Replies
3. Shell Programming and Scripting
Hi, does anyone know how to ignore whether a number is negative in a script. E.g. if I have a variable that contains -1200, how do I ignore the minus sign? (1 Reply)
Discussion started by: borderblaster
1 Replies
4. HP-UX
Hi All,
Just faced an interesting thing in HP-UX. I was dividing 2955334616 / 2 by using echo `expr 2955334616 / 2` , and this ofcourse which expects 1477667308 to be returned. But I am getting -669816340 and I am :wall: how exactly this is possible. It is not one of the compliments (Ones or... (4 Replies)
Discussion started by: mail2sanand
4 Replies
5. Shell Programming and Scripting
Hello all,
I'm new to the forums and hope to be able to contribute something useful in the future; however I must admit that what has prompted me to join is the fact that currently I need help with something that has me at the end of my tether.
I have a PDB (Protein Data Bank) file which I... (13 Replies)
Discussion started by: crunchgargoyle
13 Replies
6. Shell Programming and Scripting
hi all experts,
i=1;
while
do
echo $i
$i=$i+1
done
can I use
min=2
max=5
if (($min > $ max))
then
else (2 Replies)
Discussion started by: hamnsan
2 Replies
7. Shell Programming and Scripting
Hello, I am trying to write a bash script which will give me the most negative number. Here is an example input:
Ce 3.7729752124 -4.9505731588 -4.1061257680
Ce -6.9156611391 -0.5991784762 7.3051893138
Ce 7.6489739875 0.3513020731 ... (6 Replies)
Discussion started by: sdl27789
6 Replies
8. Shell Programming and Scripting
considering the following table:
ID col1 col2 col3 col4
1 -16.06801249 13.49785832 -56.57087607 -27.00500526
2 -1.53315720 0.71731735 -42.03602078 -39.78554623
3 -1.53315190 0.71731587 -42.03601548 ... (3 Replies)
Discussion started by: Birda
3 Replies
9. Shell Programming and Scripting
I am using a small script to divide some numbers in a given file and display the output in another file. I am getting the following error
basename: invalid option -- '5'
Try `basename --help' for more information.
(standard_in) 1: syntax error
The script is :
#!/bin/bash
for i in `cat... (4 Replies)
Discussion started by: kmnr877
4 Replies
10. UNIX for Beginners Questions & Answers
Hi ALL,
I am having semi column separated file as below. I am having negative values for the records starting with 11095. How can I convert that positive number
I tried this below seems not working
sed 's/ \(*\)$/ -\1/;t;s/\(.*\)-/\1/ myfile
myfile... (6 Replies)
Discussion started by: arunkumar_mca
6 Replies
rlprd(8) UNIX Reference Manual rlprd(8)
NAME
rlprd - remote printing proxy daemon
SYNOPSIS
rlprd [-nqV] [-pport] [-ttimeout] [--debug]
DESCRIPTION
rlprd is a proxy which runs between the remote printing commands (rlpr(1), rlpq(1), and rlprm(1)) and standard lpd print servers in situa-
tions where the remote printing commands cannot be installed setuid root. For a discussion on how to configure the remote printing com-
mands, please see rlpr(1).
rlprd needs to be installed setuid root - if it cannot be run this way, it is useless.
rlprd works by mapping non-privileged port requests from rlpr(1) clients to privileged ports so that lpd's will listen to them. Eliminat-
ing the "security" gained by having privileged ports is a non-issue, since the Internet is no longer just Unix, and Unix is the only OS
that has the privileged port concept.
rlprd is not a replacement for lpd(8). It merely passes data to a lpd(8) on a target machine (which is specified by an invocation of a
remote printing command). However, when a client is using the rlpr suite of tools to do remote printing, the client does not need to run
an lpd(8) locally.
Note that once an rlprd is set up on a network (including the Internet), any host may connect to it and use its proxy services if it knows
the name of the machine running it.
OPTIONS
--debug
Print gobs of debugging information.
-n, --no-daemon
Don't run rlprd as a daemon. Usually not needed.
-p, --port=number
Select an alternate port (instead of 7290) to listen on. Usually not needed.
-q, --quiet, --silent
Quiet mode - stay quiet (except for fatal errors).
-t --timeout=seconds
Set the inactivity timer. If the connection hangs for more than seconds seconds, then rlprd will time out the connection. Use the
special value `-1' to wait forever. Default timeout is 3 seconds.
-V, --version
Print version and exit.
SEE ALSO
rlpr(1), rlpq(1), rlprm(1), rlprrc(5)
AUTHOR
meem <meem@gnu.org>
BUGS
/LIMITATIONS
It is not currently possible to run rlprd from inetd(8).
rlpr 2.04 1999/10/28 rlprd(8)