1.
the above command will generate a executable file called "test " in which ever directory it is run.
Assuming It will also return a value.
2. In the below SCRIPT . test is a file generated by compiling a c program from firstprog.c... When ever i run this executable file generated by a C prog,
::::: Now i am writing a script to run that executable file " test " through the script and whatever return value " test " generates has to be used to check a condition.
MY PROBLEM here is : I am not able to read that file as show below./....
when I run this script... following error is show.
ERROR shown as :
i have a function written in one shell script and i want to call that function in another shell script and use the value returned by that script.
can any one suggest me how can i do that?
regards,
Rajesh.P (4 Replies)
please help me in this script
shell script :1
***********
>cat file1.sh
#!/bin/bash
echo "this is first file"
function var()
{
a=10
b=11
}
function var_1()
{
c=12
d=13 (2 Replies)
#!/bin/bash
FUN_ECHO(){
echo $1
}
FUN_ECHO "hi how are you ?"
This code will work fine.
BUT is it possible to make the following to work ?
FUN_ECHO "hi how are you ?"
FUN_ECHO(){
echo $1
}
I know that the code will be executed line by line. But i have a number of... (5 Replies)
hi everyone
i am trying to do this
bash> cat abc.sh
deepak()
{
echo Deepak
}
deepak
bash>./abc.sh
Deepak
so it is giving me write simply i created a func and it worked
now i modified it like this way
bash> cat abc.sh (2 Replies)
I've 2 shell scripts viz., CmnFuncs.ksh and myScript.ksh.
1st script contains all common functions and its code is as below:
$vi CmnFuncs.ksh
#!/bin/ksh
RunDate()
{
....
....
export Rundt=`date +%Y%m%d`
}
2nd script is invoking the above one and I expect to use the RunDt variable... (8 Replies)
I am getting Segmentation fault at below function call in my script:
get_x() {
sqlplus -s / <<end | grep KEEP | sed 's/KEEP//;s///g'
select 'KEEP' ,table_name from all_synonyms where upper(synonym_name)= '$1';
exit
end
x=$(get_x $1)
echo " SQL OUTPUT IS :: $x"
}
I am getting output of... (1 Reply)
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)
Hi, I am complete new to C programming and shell scripting. I just wrote a simple C code to calculate integral using trapezoid rule. I am prompting user to pass me No. of equally spaced points , N , upper and lower limit. My code looks as follows so far:
#include<stdio.h>
#include<string.h>... (2 Replies)
I am converting shell script to Perl. In shell I have a code
parse_prog_args()
{
if
then
while
do
case $1 in
-P* | -p* )
export PROCESS_DATE=$2
export MM=`echo $2 | cut -c5-6`
export DD=`echo $2 | cut -c7-8`
export YY=`echo $2 | cut -c3-4`
export... (4 Replies)
Discussion started by: digioleg54
4 Replies
LEARN ABOUT DEBIAN
specrb
SPECRB(1)SPECRB(1)NAME
specrb - standalone test runner for test/spec and Test::Unit test suites
SYNOPSIS
specrb [OPTIONS] [FILES | -a ] [-- untouched arguments]
DESCRIPTION
The Ruby script specrb allows you to run tests written with test/spec from the command line. It can also be used for plain Test::Unit test
suites. You can either specify the names of the test files you want to run, or let specrb find automatically all the tests in your project,
by using the -a switch (see TEST/SPEC OPTIONS below).
You can also use various options on the command line to pass parameters to the Ruby interpreterm or to modify the behavior of test/spec
and/or test/unit.
RUBY OPTIONS -e, --eval LINE
evaluate a LINE of code
-d, --debug
set debugging flags (set $DEBUG to true)
-w, --warn
turn warnings on for your script
-I, --include PATH
specify $LOAD_PATH (may be used more than once)
-r, --require LIBRARY
require the LIBRARY, before executing your script
TEST /SPEC OPTIONS:
-s, --specdox
do AgileDox-like output
--rdox
do AgileDox-like output with RDoc formatting
-a, --automatic
gather tests from ./test/, include ./lib/
TEST ::UNIT OPTIONS:
-n, --name NAME
runs tests matching regexp NAME
-t, --testcase TESTCASE
runs tests in TestCases matching regexp TESTCASE
COMMON OPTIONS :
-h, --help
show a message similar to this manpage
--version
show version
AUTHORS
The test/spec library has been written by Christian Neukirchen <http://purl.org/net/chneukirchen>.
This manual page, inspired by the help message of specrb, has been written for the Debian Project by Cedric Boutillier (but may used by
others).
2012-06-26 SPECRB(1)