Hi,
Is there a way to evaluate an equation contained in a string within an AWK script?
For example:
A = "(5*2)-1" (this equation is read from a file and varies line by line)
In this example, I can't see any way to get an answer of 9 unless I do:
cmd = "awk 'BEGIN{print "A"}'"
cmd |... (3 Replies)
Hi, I am in ksh88
I am trying to get the result of the calculation using 3 variables:
TOTAL
CAPACITY
and get the following error:
$DB_CAPACITY=(( $DB_SIZE * 100 / $TOTAL ))
ksh: syntax error: `((' unexpected
I cannot figure out what am I doing wrong... Thanks for any help -A (2 Replies)
if input to the perl program is ' ( p * ((a+b) * (c+d))) + q ' it shuld give the output as ' pac + pad + pbc + pbd + q ' .can anyone suggest a way to do this ? (7 Replies)
I'm running a MPI program using a cluster of 4 machines(different machines of different processing power,cpu utilization etc.). I'm trying to balance the computation among the machine to get the minimum execution time for that. I tried to balance it by creating a threshold value by taking the load... (1 Reply)
HI All,
I have a script in bash that i want that script will perform action
When the size of a particular folder exceeds the 80%.
Here is an example of script that result is exactly 80% :
#!/bin/bash
CHECK=$(df -h /var/log/syslog | grep '80%' | xargs echo | cut -d' ' -f5)
if ];... (1 Reply)
! The one-dimensional PDE for heat diffusion equation
! u_t=(D(u)u_x)_x + s where u(x,t) is the temperature,
! D(u) is the diffusivity and s(x,t) is a source term.
! Taking D(u)= 1 and s(x,t)=0 gives
! u_t= u_xx
! uniform one dimensional region |x|<1 for t>0
! uniform mesh size delta x=0.1
!... (1 Reply)
I want to automate change in 'from yyyy/mm/dd to yyyy/mm/dd' every month in a unix program.
For example in this month 'from yyyy/mm/dd to yyyy/mm/dd' is 'from 2014/10/01 to 2014/11/01' next month it should be 'from 2014/11/01 to 2014/12/01'
Can any one provide me the code for the above... (2 Replies)
Well guys and gals I have discovered after all these years that Python does complex numbers without the 'complex()' function or 'cmath' import.
It is well known that Euler's Identity E**(i*pi)+1=0 so I decided to experiment
Last login: Fri Dec 13 18:27:30 on ttys000
AMIGA:amiga~> python3.8... (0 Replies)
Discussion started by: wisecracker
0 Replies
LEARN ABOUT BSD
lxref
LXREF(1) General Commands Manual LXREF(1)NAME
lxref - lisp cross reference program
SYNOPSIS
lxref [ -N ] xref-file ... [ -a source-file ... ]
DESCRIPTION
Lxref reads cross reference file(s) written by the lisp compiler liszt and prints a cross reference listing on the standard output. Liszt
will create a cross reference file during compilation when it is given the -x switch. Cross reference files usually end in `.x' and conse-
quently lxref will append a `.x' to the file names given if necessary. The first option to lxref is a decimal integer, N, which sets the
ignorelevel. If a function is called more than ignorelevel times, the cross reference listing will just print the number of calls instead
of listing each one of them. The default for ignorelevel is 50.
The -a option causes lxref to put limited cross reference information in the sources named. lxref will scan the source and when it comes
across a definition of a function (that is a line beginning with `(def' it will preceed that line with a list of the functions which call
this function, written as a comment preceeded by `;.. ' . All existing lines beginning with `;.. ' will be removed from the file. If the
source file contains a line beginning `;.-' then this will disable this annotation process from this point on until a `;.+' is seen (how-
ever, lines beginning with `;.. ' will continue to be deleted). After the annoation is done, the original file `foo.l' is renamed to
`#.foo.l'" and the new file with annotation is named `foo.l'
AUTHOR
John Foderaro
SEE ALSO lisp(1), liszt(1)BUGS 4th Berkeley Distribution April 29, 1985 LXREF(1)