Hi All,
I need some help/ideas in coming up with a shell script.
Basically, the script should install 1 or 2 or 3 packages based on the input arguments.
For example, if I type in pkgscript.sh a1 a2 a3, it should install all the 3 scripts and pkgscript.sh a1 should install only a1.
If a... (3 Replies)
Hi,
I have two shell variables $t1 and $t2 which I need to pass to a function in a shell script. The function will do some computation with those two variables and echo the resultant. But I do not know how to pass teh arguments.
The function written is
f1()
{......
........
}
What should... (3 Replies)
Hi,
I have a shell script called ftp.sh which is running continously in background.
I tried passing arguments to this script but it did not worked out.
Below is ftp.sh script. Please help me
case $param in
start) sleep_func "300"
echo "!ksh $scr_ddir/ftp.sh... (1 Reply)
I have no idea what the following means. The teacher is too advanced for me to understand fully. We literally went from running a few commands over the last few months to starting shell scripting. I am not a programmer, I am more hardware oriented. I wish I knew what this question was asking... (3 Replies)
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
Hello,
I have to make a shell script doing that :
the program tests if there is an argument, if there is it checks whether this is a directory or not, If it is it opens it.
for any .c file in the directory it prints 2 lines in the screen :
the dependence line of the .o and compiler commend... (1 Reply)
Hi,
I have a shell script, when run it i get a prompt to enter arguments say 1 for doing my next task otherwise q for quit.
What I am trying to do is run the shell script with the argument passed in however it does not seem to work.
This is what I did
./test.sh 1
Instead it printed the line... (6 Replies)
I need to run a local shell script on a remote machine. I am able to achieve that by executing the command
> ssh -qtt user@host < test.sh
However, when I try to pass arguments to test.sh it fails.
Any pointers would be appreciated. (7 Replies)
Dear All,
I want to know how can i call oracle function from shell script code . My oracle function have around 5 input parameters and one return value.
for name in *.csv;
do
echo "connecting to DB and start processing '$name' file at "
echo "csv file name=$x"
sqlplus -s scoot/tiger <!... (2 Replies)
I have a shell script, which has a function, which call a perl script. Also it has a shell function call parse_ars as fogllow:
#!/bin/ksh
load_ici_dat() {
cd ${OUTPUT_DIR}
typeset batch_file=XRED${MM}${DD}
typeset SCRIPT="${PROG}.pl"
echo "time ${PERLEXE5X} ${PERL_HOME}/${SCRIPT}... (1 Reply)
Discussion started by: digioleg54
1 Replies
LEARN ABOUT CENTOS
funimagerowput
funimagerowput(3) SAORD Documentation funimagerowput(3)NAME
FunImageRowPut - put row(s) of an image
SYNOPSIS
#include <funtools.h>
void *FunImageRowPut(Fun fun, void *buf, int rstart, int rstop,
int dim1, int dim2, int bitpix, char *plist)
DESCRIPTION
The FunImageRowPut() routine writes one or more image rows to the specified FITS image file. The first argument is the Funtools handle
returned by FunOpen(). The second buf argument is a pointer to the row data buffer, while the third and fourth arguments specify the
starting and ending rows to write. Valid rows values range from 1 to dim2, i.e., row is one-valued.
The dim1and dim2 arguments that follow specify the dimensions, where dim1 corresponds to naxis1 and dim2 corresponds to naxis2. The bitpix
argument data type of the image and can have the following FITS-standard values:
o 8 unsigned char
o 16 short
o 32 int
o -32 float
o -64 double
For example:
double *drow;
Fun fun, fun2;
... open files ...
/* get section dimensions */
FunInfoGet(fun, FUN_SECT_DIM1, &dim1, FUN_SECT_DIM2, &dim2, 0);
/* allocate one line's worth */
drow = malloc(dim1*sizeof(double));
/* retrieve and process each input row (starting at 1) */
for(i=1; i <= dim2; i++){
if( !FunImageRowGet(fun, drow, i, i, "bitpix=-64") )
gerror(stderr, "can't FunImageRowGet: %d %s
", i, iname);
... process drow ...
if( !FunImageRowPut(fun2, drow, i, i, 64, NULL) )
gerror(stderr, "can't FunImageRowPut: %d %s
", i, oname);
}
...
The data are assumed to be in the native machine format and will automatically be swapped to big-endian FITS format if necessary. This
behavior can be over-ridden with the convert=[true|false] keyword in the plist param list string.
When you are finished writing the image, you should call FunFlush() to write out the FITS image padding. However, this is not necessary if
you subsequently call FunClose() without doing any other I/O to the FITS file.
SEE ALSO
See funtools(7) for a list of Funtools help pages
version 1.4.2 January 2, 2008 funimagerowput(3)