As far as the script, you might consider indenting the info in loops and if statements to make the more readable.
Most scripts I've seen don't do:
and
Usually it's something like:
That way it's easier to see what code belongs with which part of a statement.
Yea, that while loop. I didn't realize it was a large as it was until I looked a little harder. It initially looked like an infinite loop.
And you're going to need to echo something to the mail statements. At least on the one I just tested it on, mail is looking for a body to pass along. So something like:
Also, $? is a numeric value so use "-eq" vs "=". It'll probably work but it's always good to use the correct syntax.
I have the following crontab entry to run a shell script for every 30 minutes of every day:
30 * * * * $HOME/main.sh > $HOME/main.log 2>$HOME/error.log
after I created the crontab file I have also done:
$crontab my_crontab
I also check to make sure it exists, by using the following... (11 Replies)
Please help - I have seen others ask this question but I need a simple example of using vi in a shell script. Once I enter VI the shell script does not execute the next commands until I q!. I invoke VI and start the edit process. I want to go to the third line and replace a character with a new... (2 Replies)
Hi, need help, I would like to know what is this IF statement trying to do? When the script is executing and error out with line 9 which is the IF statement line.
if ]
then
TOPDIR=$(pwd)
else
TOPDIR=${0%/*}
fi
TOPDIR=${TOPDIR%/*}
the log file.
Current system time is... (15 Replies)
I made a shell script to execute a server in screen mode.
# start server
screen -d -m -S Test ./application
echo "Program Started Successfully"
than I'm executing it from php by
echo shell_exec('/home/script.sh');
and it is giving me this error.
"cannot make directory... (1 Reply)
Hi,
I am having a shell script which has a while loop as shown below.
while
do
sleep 60
done
I am executing this script from Informatica ETL tool command task from where we can execute UNIX commands/scripts. When i do that, i am seeing 2 processes getting started for one script... (2 Replies)
Hi
As per my requirement when I run . ./file.sh am getting the following error
-bash:ELF: command not found
when i execute as ./file.sh it is getting executed.How to resolve this.
Thanks in advance. (3 Replies)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (1 Reply)
Hi every one, i am new to shell script. my people given a task to write a shell script that should execute number of shell scripts in that. in that, if any shell script is failed to execute, we have to run the main script again, but the script should start execute from the failed script only..
it... (6 Replies)
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies
LEARN ABOUT DEBIAN
imager::expr::assem
Imager::Expr::Assem(3pm) User Contributed Perl Documentation Imager::Expr::Assem(3pm)NAME
Imager::Expr::Assem - an assembler for producing code for the Imager
register machine
SYNOPSIS
use Imager::Expr::Assem;
my $expr = Imager::Expr->new(assem=>'...', ...)
DESCRIPTION
This module is a simple Imager::Expr compiler that compiles a low-level language that has a nearly 1-to-1 relationship to the internal
representation used for compiled register machine code.
Syntax
Each line can contain multiple statements separated by semi-colons.
Anything after '#' in a line is ignored.
Types of statements:
variable definition
"var" name:type
defines variable name to have type, which can be any of "n" or "num" for a numeric type or "pixel", "p" or "c" for a pixel or color
type.
Variable names cannot include white-space.
operators
Operators can be split into 3 basic types, those that have a result value, those that don't and the null operator, eg. jump has no
value.
The format for operators that return a value is typically:
result = operator operand ...
and for those that don't return a value:
operator operand
where operator is any valid register machine operator, result is any variable defined with "var", and operands are variables, constants
or literals, or for jump operators, labels.
The set operator can be simplified to:
result = operator
All operators maybe preceded by a label, which is any non-white-space text immediately followed by a colon (':').
BUGS
Note that the current optimizer may produce incorrect optimization for your code, fortunately the optimizer will disable itself if you
include any jump operator in your code. A single jump to anywhere after your final "ret" operator can be used to disable the optimizer
without slowing down your code.
There's currently no high-level code generation that can generate code with loops or real conditions.
SEE ALSO Imager(3), transform.perl, regmach.c
AUTHOR
Tony Cook <tony@develop-help.com>
perl v5.14.2 2011-06-06 Imager::Expr::Assem(3pm)