Sponsored Content
Full Discussion: AWK equation evaluation.
Top Forums Shell Programming and Scripting AWK equation evaluation. Post 302146821 by drl on Thursday 22nd of November 2007 10:20:39 AM
Old 11-22-2007
Hi.

Many interpreted languages have an eval feature, e.g. snobol, perl,.

I don't know of one for awk, but I'd be happy to learn of one ... cheers, drl
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

equation calculation on Unix

Hay, guys, Any ideas how to calculate like this: in first file, there're number of lines listing 2+3, 6*9 ....... Then, how to get the result and put them in another file in format: 2+3 5 6*9 54 ...... sheerly by shell command, no scripts required. (4 Replies)
Discussion started by: robbinGlasses
4 Replies

2. Shell Programming and Scripting

Perl - maths equation - need help

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)
Discussion started by: Anuj8584
7 Replies

3. High Performance Computing

Performance Equation

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)
Discussion started by: chamila1986
1 Replies

4. Shell Programming and Scripting

Using AWK in IF evaluation in KSH

Hi - I have an expression that evaluates to "Alive" or some other condition. e.g. if I run :- awk -F \| '{gsub(/]*/,"",$4); print $4 }' then the output is "Alive". I want to be able to test this as the result may be some other condition other than "Alive". I have tried the following... (4 Replies)
Discussion started by: sniper57
4 Replies

5. UNIX for Dummies Questions & Answers

cp command evaluation

Hi all! I'm writting one script to copy a file in various folders, but there are 2 things to validate. First that the folder where i'll be cpying exists, and second that i have permissions to copy the file in it. so far i have found the way to validate the folder exists, but when trying to... (6 Replies)
Discussion started by: feliperivera
6 Replies

6. Shell Programming and Scripting

Help with insert a value equation in bash script

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)
Discussion started by: Aviel.shani
1 Replies

7. Homework & Coursework Questions

Solving heat equation using crank-nicolsan scheme in FORTRAN

! 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)
Discussion started by: watto1
1 Replies

8. Programming

E**(i*pi)=-1 or e**(j*pi)=-1, something I found out in Python using part of Eulers Identit equation.

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
CONFIG_DATA(1)						 Perl Programmers Reference Guide					    CONFIG_DATA(1)

NAME
config_data - Query or change configuration of Perl modules SYNOPSIS
# Get config/feature values config_data --module Foo::Bar --feature bazzable config_data --module Foo::Bar --config magic_number # Set config/feature values config_data --module Foo::Bar --set_feature bazzable=1 config_data --module Foo::Bar --set_config magic_number=42 # Print a usage message config_data --help DESCRIPTION
The "config_data" tool provides a command-line interface to the configuration of Perl modules. By "configuration", we mean something akin to "user preferences" or "local settings". This is a formalization and abstraction of the systems that people like Andreas Koenig ("CPAN::Config"), Jon Swartz ("HTML::Mason::Config"), Andy Wardley ("Template::Config"), and Larry Wall (perl's own Config.pm) have developed independently. The configuration system employed here was developed in the context of "Module::Build". Under this system, configuration information for a module "Foo", for example, is stored in a module called "Foo::ConfigData") (I would have called it "Foo::Config", but that was taken by all those other systems mentioned in the previous paragraph...). These "...::ConfigData" modules contain the configuration data, as well as publicly accessible methods for querying and setting (yes, actually re-writing) the configuration data. The "config_data" script (whose docs you are currently reading) is merely a front-end for those methods. If you wish, you may create alternate front-ends. The two types of data that may be stored are called "config" values and "feature" values. A "config" value may be any perl scalar, including references to complex data structures. It must, however, be serializable using "Data::Dumper". A "feature" is a boolean (1 or 0) value. USAGE
This script functions as a basic getter/setter wrapper around the configuration of a single module. On the command line, specify which module's configuration you're interested in, and pass options to get or set "config" or "feature" values. The following options are supported: module Specifies the name of the module to configure (required). feature When passed the name of a "feature", shows its value. The value will be 1 if the feature is enabled, 0 if the feature is not enabled, or empty if the feature is unknown. When no feature name is supplied, the names and values of all known features will be shown. config When passed the name of a "config" entry, shows its value. The value will be displayed using "Data::Dumper" (or similar) as perl code. When no config name is supplied, the names and values of all known config entries will be shown. set_feature Sets the given "feature" to the given boolean value. Specify the value as either 1 or 0. set_config Sets the given "config" entry to the given value. eval If the "--eval" option is used, the values in "set_config" will be evaluated as perl code before being stored. This allows moderately complicated data structures to be stored. For really complicated structures, you probably shouldn't use this command-line interface, just use the Perl API instead. help Prints a help message, including a few examples, and exits. AUTHOR
Ken Williams, kwilliams@cpan.org COPYRIGHT
Copyright (c) 1999, Ken Williams. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Module::Build(3), perl(1). perl v5.18.2 2018-08-17 CONFIG_DATA(1)
All times are GMT -4. The time now is 06:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy