09-01-2008
Thanks folks...
Thanks for the really helpful posts.
A combination of writing only ints to standard output from my program and the use of backtics has cracked my problem.
Thanks for spending the time to explain & provide a solution too - much appreciated.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm trying to assign the output of a command to a variable and then concat it with another string, however, it keeps overwriting the original string instead of adding on to the end of the string.
Contents of test.txt --> This is a test
var1="`head -n 1 test.txt`"
echo $var1 (This is a... (5 Replies)
Discussion started by: oma04
5 Replies
2. Shell Programming and Scripting
I have the sql file cde.sql with the below contents:
abcdefghij
abcwhendefothers
sdfghj
when no one else
when others
wwhen%others
exception when others
Now I want to search for the strings containing when others together and ceck whether that does not occur more than once in the... (2 Replies)
Discussion started by: kprattip
2 Replies
3. Shell Programming and Scripting
hi,
I want to assign find command result into some temporary variable:
jarPath= find /opt/lotus/notes/ -name $jarFile
cho "the jar path $jarPath"
where jarPath is temporary variable.
Can anybody help on this.
Thanks in advance
----Sankar (6 Replies)
Discussion started by: sankar reddy
6 Replies
4. Shell Programming and Scripting
When I run time -p <command>, it outputs:
real X.XX
user X.XX
sys X.XXwhere X.XX is seconds. How I can take just that first number output, the seconds of real time, and assign that to a variable? (9 Replies)
Discussion started by: jeriryan87
9 Replies
5. UNIX for Dummies Questions & Answers
Hello
I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable:
FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}`
When the command... (6 Replies)
Discussion started by: Glyn_Mo
6 Replies
6. Shell Programming and Scripting
Hi All,
I have a tcsh script as:
#!/usr/bin/csh -x
set packsName=$(awk -F'' '/^execute.*=true/{print $2}' ExecutePacks.config)
for var in $packsName
do
echo "printed $var"
done
I want to assign the value which is returned by awk function to the variable called packsName.
How do I... (2 Replies)
Discussion started by: AB10
2 Replies
7. Shell Programming and Scripting
I have a code like this
v_num=9
comp_num=39
if
then
echo "pass"
fi
echo "end"
I am getting an error
ksh: v_num=99
comp_num=39
if
then
echo "pass"
fi
echo "end" (3 Replies)
Discussion started by: swayam123
3 Replies
8. UNIX for Dummies Questions & Answers
Hi I have a text file with 2 values and I am trying to assign each value to a variable and then write those to text files.
So if the textfile is data.txt with 2 values x and y
I want to assign mean=x, and stdev=y and then write these out in text files alongwith the id ($id has already been... (6 Replies)
Discussion started by: violin
6 Replies
9. Shell Programming and Scripting
Hi
I have this command, which counts number of lines in a specific file and then prints it on screen.nawk 'NF{c++}END{print "Number of GPS coordinates in file: "c}' $filename
I would like to have the output put into a variable, but can't seem to find the correct argument for it.
How do I... (3 Replies)
Discussion started by: bulleteyedk
3 Replies
10. Shell Programming and Scripting
Hi,
I'm writing a script that connects through ssh (using "expect") and then is supposed to find whether a process on that remote machine is running or not. Here's my code (user, host and password are obviously replaced with real values in actual script):
#!/usr/bin/expect
set timeout 1... (3 Replies)
Discussion started by: oseri
3 Replies
mccs(1) Debian User's Manual mccs(1)
NAME
mccs - package dependency solver
SYNOPSIS
mccs [options]
DESCRIPTION
mccs (which stands for Multi Criteria CUDF Solver) is a solver for package dependency problems expressed in the CUDF format. By default,
mccs reads a problem specification from standard input, and writes the solution to standard output.
OPTIONS FOR CONTROLLING INPUT
/OUTPUT
-i file
Read input from file file instead of standard input.
-o file
Write the solution to file instead of standard output.
-fo full solution output
-v n set verbosity level to n.
-h print this help
OPTIONS FOR SELECTING THE SOLVER ENGINE
By default, mccs uses the cbc solving engine.
-lpsolve
use lpsolve solver
-lp lpsolver
specify a solving engine that takes the cplex input format. lpsolver is the path of a script that takes as input the file name con-
taining the cplex input, and that produces the solution on standard output (an example for scip is given in
/usr/share/doc/mccs/engines/sciplp).
-pblib pbsolver
use pseudo-Boolean solver pbsolver as solving engine.
-nosolve
do not solve the problem (for debugging)
OPTIONS FOR CONTROLLING CONSTRAINT GENERATION
-noreduce
do not reduce the initial problem
-only-agregate-constraints
generate only agregate constraints
-only-desagregate-constraints
generate only deagregate constraints (default)
-all-constraints
generate all kind of constraints (ensure redundancy)
OPTIONS FOR CONTROLLING OPTIMIZATION
See the file /usr/share/doc/mccs/README.optimization-criteria for a full grammar of optimization criteria.
EXAMPLES
An example input file can be found at /usr/share/doc/mccs/examples/legacy.cudf.
mccs -i legacy.cudf
calls mccs on examples/legacy.cudf and prints the solution on stdout. With such a call mccs will resort to the default underlying solver
cbc and use a default criterion to solve the problem.
mccs -i legacy.cudf -o sol -lexagregate[-removed,-changed]
-lpsolve
Here, mccs puts the solution into the file "sol" and solves the problem using the lpsolve solver with the paranoid criterion, which con-
sists of first minimizing the number of removed packaged, and then the number of packages that change installation status or installed ver-
sion.
mccs -i legacy.cudf -o sol
-lexsemiagregate[-removed,-notuptodate,
-nunsat[recommends:,true],-new]
The criterion used here is the trendy criterion, which consists of first minimizing the number of package removals, then to minimize the
number of installed packages that are installed in a version older the most recent available version, then to minimize the number of recom-
mendations of installed packages that are not satisfied, and finally the number of newly installed packages.
AUTHOR
mccs has been written by Claude Michel <cpjm@polytech.unice.fr>. The development of mccs has been partly supported by the European research
project Mancoosi.
9 May 2011 mccs(1)