Sponsored Content
Full Discussion: Invalid arithmetic operator
Top Forums UNIX for Dummies Questions & Answers Invalid arithmetic operator Post 302842989 by RudiC on Sunday 11th of August 2013 02:06:32 PM
Old 08-11-2013
Don't use parentheses; use [[ . . . ]] instead.
And, be aware that this will be a string compare, so 10/08/2013 is gt 09/08/2014...
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

time arithmetic

Can anyone help please. I am writing a kourne shell script and I am unsure how to do the following: I have extracted a time string from a logfile, and I have another time string I want to compare it to to see if it's later than the time I'm comparing with. i.e. expectedSLA="23:00:00", ... (2 Replies)
Discussion started by: csong2
2 Replies

2. Shell Programming and Scripting

arithmetic in ksh

Helloo.. I am trying one very simple thing I could not find anything on google.. I have 2 integer variable..and I need to do division...in ksh where $catch and $num are integer variable.. I tryed with this: printf "%0.2f" $final=$catch/$num but it does not work.. any help is... (12 Replies)
Discussion started by: amon
12 Replies

3. Shell Programming and Scripting

arithmetic in tcsh

Yes I know tcsh sucks for scripting and arithmetic but I have to write a script for multiple users and they all use tcsh. I have this variable that I 'set' with but pulling numbers off of stings with set STUFF = `grep string file | awk command` Now I would like to add up the numbers that... (4 Replies)
Discussion started by: gobi
4 Replies

4. UNIX for Dummies Questions & Answers

Arithmetic Operators

Hello, I have a list of 'inputs' and i want to convert those on the second list named 'Desired Outputs', but i don't know how to do it? Inputs Desired Outputs 1 2 94 4 276 8 369 10 464 12 ... (0 Replies)
Discussion started by: filda
0 Replies

5. Shell Programming and Scripting

Arithmetic on timestamps

Hi Friends, please advise on shell script to add two time stamps for example : a=12:32 b=12:00 c=a+b=00:32 please help me to find shell script to add to two time stamps, as i need to convert time from EST to GMT or SST to prepare status of jobs in unix and to specify estimated time to... (3 Replies)
Discussion started by: balireddy_77
3 Replies

6. UNIX for Dummies Questions & Answers

Arithmetic: how to??

Hello all, I'd like to know how to perform arithmetic on multiple files. I have got many tab-delimited files. Each file contains about 2000 rows and 2000 columns. What I want to do is to to sum the values in each row & column in every file. The following explains what I want to do; ... (9 Replies)
Discussion started by: Muhammad Rahiz
9 Replies

7. UNIX for Dummies Questions & Answers

syntax error: invalid arithmetic operator

hi, i have a bash script that i want to receive a a string from another bash file. But because the string has a dot in the middle it gives me an error. The error is in this line: let valor=$1 and the value passed is rules.txt the error is: let: valor=rules.txt: syntax error: invalid... (2 Replies)
Discussion started by: limadario
2 Replies

8. Shell Programming and Scripting

checking variables + arithmetic operator help

i'm trying to make a script to simply add numbers together for example i have a file script file called add add 1 2 3 4 5 15 however i want the user to put at least 3 numbers so i did this if then echo "please enter more than two numbers" exit 1 fi but it's telling me i have... (3 Replies)
Discussion started by: el3ctr0nic47
3 Replies

9. Shell Programming and Scripting

BC calculation for floating (invalid arithmetic operator )

Hi, I wish to compare the CPU LOAD 1 min with 5mins and 15mins. If 1 min's CPU LOAd spike 3% compare to 5 mins or 15 mins CPU Load, it is warning. If 1 min's CPU LOAd spike 5% compare to 5 mins or 15 mins CPU Load, it is critical. However I received following code error, I google it and... (10 Replies)
Discussion started by: alvintiow
10 Replies

10. UNIX for Beginners Questions & Answers

Invalid arithmetic operator on string concatenation

Hello. LEAP_VERSION="4.2" export ARRAY_MAIN_REPO_LEAP=('zypper_local' 'openSUSE-Leap-'"$LEAP_VERSION"'-Non-Oss' 'openSUSE-Leap-'"$LEAP_VERSION"'-Oss' 'openSUSE-Leap-'"$LEAP_VERSION"'-Update' 'openSUSE-Leap-'"$LEAP_VERSION"'-Update-Non-Oss')Seems that the - is interpreted as a numeric... (2 Replies)
Discussion started by: jcdole
2 Replies
CHDIST(1)																 CHDIST(1)

NAME
chdist - script to easily play with several distributions SYNOPSIS
chdist [options] [command] [command parameters] DESCRIPTION
chdist is a rewrite of what used to be known as 'MultiDistroTools' (or mdt). Its use is to create 'APT trees' for several distributions, making it easy to query the status of packages in other distribution without using chroots, for instance. OPTIONS
-h, --help Provide a usage message. -d, --data-dir DIR Choose data directory (default: $HOME/.chdist/). -a, --arch ARCH Choose architecture (default: `dpkg --print-architecture`). --version Display version information. COMMANDS
create DIST [URL RELEASE SECTIONS] Prepare a new tree named DIST apt-get DIST <update|source|...> Run apt-get inside DIST apt-cache DIST <show|showsrc|...> Run apt-cache inside DIST apt-rdepends DIST [...] Run apt-rdepends inside DIST src2bin DIST SRCPKG List binary packages for SRCPKG in DIST bin2src DIST BINPKG List source package for BINPKG in DIST compare-packages DIST1 DIST2 [DIST3, ...] compare-bin-packages DIST1 DIST2 [DIST3, ...] List versions of packages in several DISTributions compare-versions DIST1 DIST2 compare-bin-versions DIST1 DIST2 Same as compare-packages/compare-bin-packages, but also runs dpkg --compare-versions and display where the package is newer. compare-src-bin-packages DIST Compare sources and binaries for DIST compare-src-bin-versions DIST Same as compare-src-bin-packages, but also run dpkg --compare-versions and display where the package is newer grep-dctrl-packages DIST [...] Run grep-dctrl on *_Packages inside DIST grep-dctrl-sources DIST [...] Run grep-dctrl on *_Sources inside DIST list List available DISTs COPYRIGHT
This program is copyright 2007 by Lucas Nussbaum and Luk Claes. This program comes with ABSOLUTELY NO WARRANTY. It is licensed under the terms of the GPL, either version 2 of the License, or (at your option) any later version. Debian Utilities 2013-12-23 CHDIST(1)
All times are GMT -4. The time now is 11:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy