04-04-2008
I have done a bit more research.
I know this is not possible especially with arguments. but still there should be a way out ..
JS
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi friends,
i'm new to unix and straight away i had to start with the script files.
I've a script file which gets called from a menu item on a GUI.
This script file again calls .awk file, in performing some tasks , which also generates certain files.
I modified the files to generate some... (1 Reply)
Discussion started by: Ravi_Kandula
1 Replies
2. Shell Programming and Scripting
Simple shell script :
date
test_fn()
{
echo "function within test shell script "
}
on the shell prompt I run
> . test
Then I invoke the function on the command line as below :
test_fn()
It echos the line
function within test shell script
and works as expected.
... (5 Replies)
Discussion started by: r_subrahmanian
5 Replies
3. Shell Programming and Scripting
hi friends,
I am working with shell commands and all these works properly.
Then i created a small function which includes these commands.
Now the problem arises. When the commands are run by calling this fuction.it
shows error.
Why i am not able to run the unix command inside a function.... (1 Reply)
Discussion started by: gjithin
1 Replies
4. Shell Programming and Scripting
Hi,
I have a K shell
a.ksh
function abc {
// Some logic
}
In
b.ksh
i have included the a.ksh
./a.ksh
I want to call the abc function from this b.ksh script.
Thanks
Vijay (2 Replies)
Discussion started by: vijaykrc
2 Replies
5. Shell Programming and Scripting
Hi there,
I have an script reading content of a file and runs whatever command is specified there, as follows
#!/bin/bash
# Supposed to read from a file that commands are listed to be run
# when the server starts for initialization
CMD_FILE=/myScripts/startup/task2do.txt
if ; then
... (2 Replies)
Discussion started by: james gordon
2 Replies
6. Shell Programming and Scripting
hey guys,
i made up a library file called common.lib so as to reuse the same code without typing it again. here is the code. its pretty basic .
## This is the second function
compare()
{
file1 = $1
file2 = $2
cmp $file1 $file2
if
then
echo "comparison is possible"... (1 Reply)
Discussion started by: Irishboy24
1 Replies
7. Shell Programming and Scripting
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
Discussion started by: shashi369
1 Replies
8. Shell Programming and Scripting
Greetings,
I m wondering if it's possible do do the following :
I have a simple function called "FindMoveDelete" which does the following :
FindMoveDelete()
{
find . -iname "$FILENAME*.ext" -exec mv {} "$PATH/$VAR" \; &&
find . -maxdepth 1 -type d -iname "$FILENAME*" -exec rm -rf {}... (6 Replies)
Discussion started by: Sekullos
6 Replies
9. Shell Programming and Scripting
so i have a very big script that has the following format:
functionA () {
....
...
....
}
Results=$(functionA)
the code inside of functionA is very huge. so by the time the script gets to the "Results=" part, several seconds have already passed. the script is about 15MB in size.... (4 Replies)
Discussion started by: SkySmart
4 Replies
10. UNIX for Beginners Questions & Answers
I want to find c function definition with pattern with shell script by checking condition for each line:
data_type
functionname(param_list){
....
}
I knew cscope or ctag is usable for this task, but if there any ways to do without using them.
I am thinking of checking line condition... (3 Replies)
Discussion started by: cmdcmd
3 Replies
MM2GV(1) General Commands Manual MM2GV(1)
NAME
mm2gv - Matrix Market-DOT converters
SYNOPSIS
mm2gv [ -cluv? ] [ -ooutfile ] [ file ]
DESCRIPTION
mm2gv converts a sparse matrix of the Matrix Market format to a graph in the GV (formerly DOT) format.
OPTIONS
The following options are supported:
-c This flag causes mm2gv to assign colors to the edges. The matrix element is scaled to the range [0,1] depending on where it lies
between the minimum and maximum set matrix values. This scaled value is used as the "wt" attribute of the corresponding edge. In
addition, this scalar value is mapped to an RGB value, which is stored as the edge "color".
-l If set, mm2gv attaches a label to the graph indicating the base name of the input file, and the number of nodes and edges.
-u If specified, the graph is assumed to be undirected. By default, the graph generated is directed.
-v This flag causes mm2gv to store the matrix values as the "len" attribute of the corresponding edge.
-ooutfile
Prints output to the file outfile. If not given, mm2gv uses stdout.
OPERANDS
The following operand is supported:
file Name of the file in MatrixMarket format. If no file operand is specified, the standard input will be used.
RETURN CODES
Return 0 if there were no problems during conversion; and non-zero if any error occurred.
AUTHORS
Yifan Hu <yifanhu@research.att.com>
Emden R. Gansner <erg@research.att.com>
ADDITIONAL INFO
See http://math.nist.gov/MatrixMarket/ for description of the format and http://www.cise.ufl.edu/research/sparse/matrices/ for a large col-
lection of sparse matrices in this format.
31 July 2008 MM2GV(1)