how can i use awk or sed to do a conditional statement, so that
HH:MM
if MM not great than 30 , then MM=00
else MM=30
ie:
10:34 will display 10:30
10:29 will display 10:00
a=$(echo 10:34 | awk ......)
Thanks in advance (10 Replies)
can somebody help, what quote i should use in below statement or what wrong of it ?
the 1st (*) is a char, the 2nd and 3rd (*) is a wildcard
if ] && ] && ]
................^ .............^
then
echo "ok"
fi
thanks in advance. (2 Replies)
Hi all,
The following code is to find if a list of numbers from one file are within the range in another file.
awk -F, '\
BEGIN {
while ((getline < "file2") > 0)
file2=$3
}
{for (col1 in file2)
if ($0>=30 && $1<=45)
print $0} ' FILE1
But where I have the number 30 and 45, I... (3 Replies)
Hi,
I'm getting a "bad number" error from the following conditional if statement. I understand the results of the grep command are not being treated a an integer but am unsure of the correct syntax. Any help would be appreciated.
if
Thanks (2 Replies)
Hi,
I have a script like this:
sample.sh
mapping=$1
if
then
echo "program passed"
fi
I'm running the above script as ./sample.sh pass
The script is not getting executed and says "integer expression expected"
Could anyone kindly help me? (2 Replies)
I want to add a conditional statement to a user's .profile file. I have a certain number of users that log in and use the rksh (Restricted Korn Shell). When they log in, it starts a certain program and when they exit this program, the system logs them out. When they are in this program, they can... (2 Replies)
I'm trying to create a shell script that will check for new files and or folders and if it exist then copy them to a different directory.
Does anyone have a idea?
if ;
then
echo "Copying files from the Upgrade Server"
cp -Ruavp /home/upgrade/hex-code/*... (7 Replies)
Hi experts,
I am doing an exercise which has the following requirements.
Charlie will bite your finger exactly 50% of the time. First, write a function isBitten() that returns TRUE with 50% probability, and FALSE otherwise
To generate a webpage that displays "Charlie bit your finger!" or... (1 Reply)
Discussion started by: Navneet_das_123
1 Replies
LEARN ABOUT DEBIAN
mace2
MACE2(1) General Commands Manual MACE2(1)NAME
mace2 - searches for finite countermodels of first-order statements
SYNOPSIS
mace2 [options] < input-file > output-file
DESCRIPTION
This manual page documents briefly the mace2 command.
mace2 is a program that searches for finite models of first-order statements. The statement to be modeled is first translated to clauses,
then to relational clauses; finally for the given domain size, the ground instances are constructed. A Davis-Putnam-Loveland-Logeman proce-
dure decides the propositional problem, and any models found are translated to first-order models. mace2 is a useful complement to the the-
orem prover otter(1), with otter searching for proofs and mace2 looking for countermodels.
OPTIONS
A summary of options is included below.
-n n This gives the starting domain size for the search. The default value is 2. If you also give an -N option, MACE will iterate domain
sizes up through the -N value. Otherwise, mace2 will search only for the -n value.
-N n This gives the ending domain size for the search. The default is the value of the -n option.
-c This says that constants in the input should be assigned unique elements of the domain. If the number of constants in the input is
greater than the domain size n, the first n constants are given values, and the rest are unconstrained. This is a useful option
because it eliminates lots of isomorphism from the search. But it can block all models, especially when used with other constraints.
-p This option tells mace2 to print models in a nice tabular form as they are found. This format is meant for human consumption.
-P This option tells mace2 to print models in an easily parsable form. This format has an otter-like syntax and can be read by most
Prolog systems.
-I This option tells mace2 to print models in IVY form. This format is a Lisp S-expression and is meant to be read by IVY, our proof
and model checker.
-m n This tells mace2 to stop after finding n models. The default is 1.
-t n This tells mace2 to stop after about n seconds. The default is unlimited. mace2 ignores any assign(max_seconds, n) commands that
might be in the input file. Such commands are used by otter only.
-k n This tells mace2 to stop if it tries to allocate more than n kilobytes of memory. The default is 48000 (about 48 megabytes). mace2
ignores any assign(max_mem, n) commands that might be in the input file. Such commands are used by otter only.
-x This is a special-purpose constraint designed to reduce isomorphism in quasigroup problems. It applies only to binary function f.
-h This tells mace2 to print a summary of these command-line options.
SEE ALSO anldp(1), formed(1), otter(1), pl(1).
Full documentation for mace2 is found in /usr/share/doc/mace2/mace2.{html,ps.gz}.
AUTHOR
mace2 ws written by William McCune <otter@mcs.anl.gov>
This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>, for the Debian project (but may be used by others).
November 5, 2006 MACE2(1)