bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash script problems


From: Tony Jo
Subject: Re: bash script problems
Date: Thu, 12 May 2005 10:31:55 +1000

"Chris F.A. Johnson" <cfajohnson@rogers.com> wrote in message
news:mailman.4693.1115841231.2819.bug-bash@gnu.org...
>     When quoting parts of a script or error messages, please be
>     accurate (cut and paste rather than retyping). You used:
>
> temp=`expr $val1 + $val2`
>
>     or you wouldn't have received that error. The line you have would
>     have assigned the literal value to $temp.
>

Oh those were meant to be single quotes.
temp='expr $val1 + $val2'


>     What are the values of $val1 and $val2? Use this command to see
>     them:
>
> printf ":%s:%s:\n" "$val1" "$val2"
>
>     What is the result of:
>
> echo $(( $val1 + $val2 ))
>
>     What command did you use to fill those variables?
>

Those lines didn't seem to print out anything unforunately
It prints out values when I simply type the variable name though.
The variable holds the following:
val1='cut -c8-9 usrTime'
val2='cut -c7-8 sysTime'






reply via email to

[Prev in Thread] Current Thread [Next in Thread]