Since you're using awk anyway, do everything in awk, because it supports floating point variables. Use awk's return status to tell the shell loop whether it finished.
Incidentally, since you're using awk, you don't need grep either, since awk can do the function of both.
Hi,
I am trying to write a script to extract multiple sets of data from a chemistry output file. The problem section is in the following format...
Geometry "geometry" -> "geometry"
1 Pd 46.0000 -0.19290971 0.00535260 0.02297606
2 P ... (7 Replies)
Hi All,
I got this script that pulls the Amps value from our RPC's , I basiclly want to compare the valued with a "limit" value -- if the numbers match or are greater than the definded value ...do something. My problem is I cant seem to figure out how to compare floating points...
here is... (1 Reply)
Hiii
I actually intent to check the integer or floating point number input by user i.e. 23, 100, 55.25, 12.50 ..etc. However, when someone input strings or alpha character, my program has to show invalid input.!! Is there any Unix shell script syntax can help me to check ?
Thanking you (2 Replies)
Hi !
I'm looking for a way to transform certain floating point numbers in a one-line, variable length file to integers.
I can do this in a crude way with sed :
sed -e 's/0\.\(\):/\1:/g' -e 's/0\.0\(\):/\1:/g' -e 's/1\.000:/100:/g' myfile ... but this doesn't handle the rounding correctly.
... (3 Replies)
Hi,
echo $i
until ||
do
read NUM
if && ; then
printf "$FBOLD\nInvalid number, please enter valid backup number: $FREG"
fi
done
Getting below error :
./import_location.sh: line 234: [: : integer expression expected
./import_location.sh: line 234: [: :... (5 Replies)
Ok, so I am beggining a script to factor the time difference from when a user logs on to current time but before I can even get too far I am getting the INTEGER EXPRESSION EXPECTED error. Can someone tell me what I am doing wrong?
lhour=$(who | grep "$1" | cut -c30,31);
lmin=$(who | grep "$1"... (1 Reply)
Newb here
echo "$yesterdaysclose"
echo "$close"
if ; then
echo "stocks moving up"
elif ; then
echo "stock is moving down"
else
echo "no change"
fi
seems to evaluate the floating decimal correctly however returns
./shellscript1.sh: line 17: [: : integer expression expected... (3 Replies)
Hi,
I have placed the script and running successfully on AIX
However in Linux it throws integer expression expected
Could some one please help me to fix this
MaxThreshold4alert=`echo "$MaxCapacitycnt*(80/100)" |bc -l`
echo $MaxThreshold4alert
Error:
40.00000000000000000000: integer... (2 Replies)
Hello ,
This is the piece of the code which is giving me trouble
if ;then
exit_proc "${SOURCEDIR}/${OUT_FILE} does not exists or not readable" 2
else
word_count=`wc -l < ${SOURCEDIR}/$OUT_FILE`
fi
if ;then
exit_proc "Word_count is more than allowed limit" 1
else... (6 Replies)
Discussion started by: Sri3001
6 Replies
LEARN ABOUT SUSE
debconf
DEBCONF(1) Debconf DEBCONF(1)NAME
debconf - run a debconf-using program
SYNOPSIS
debconf [options] command [args]
DESCRIPTION
Debconf is a configuration system for Debian packages. For a debconf overview and documentation for sysadmins, see debconf(7) (in the
debconf-doc package).
The debconf program runs a program under debconf's control, setting it up to talk with debconf on stdio. The program's output is expected
to be debconf protocol commands, and it is expected to read result codes on stdin. See debconf-devel(7) for details about the debconf
protocol.
The command to be run under debconf must be specified in a way that will let your PATH find it.
This command is not the usual way that debconf is used. It's more typical for debconf to be used via dpkg-preconfigure(8) or
dpkg-reconfigure(8).
OPTIONS -opackage, --owner=package
Tell debconf what package the command it is running is a part of. This is necessary to get ownership of registered questions right, and
to support unregister and purge commands properly.
-ftype, --frontend=type
Select the frontend to use.
-pvalue, --priority=value
Specify the minimum priority of question that will be displayed.
--terse
Enables terse output mode. This affects only some frontends.
EXAMPLES
To debug a shell script that uses debconf, you might use:
DEBCONF_DEBUG=developer debconf my-shell-prog
Or, you might use this:
debconf --frontend=readline sh -x my-shell-prog
SEE ALSO debconf-devel(7), debconf(7)AUTHOR
Joey Hess <joeyh@debian.org>
2018-02-28 DEBCONF(1)