Writing a UNIX shell script to call a C function and redirecting data to a .txt file
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:
Now, I want to write a unix script which calls the program for N = 2^{i} for integers i from 1, 2, 3, ..., 20 and use the Unix redirect operator > to record this data in a file.
I am searching over internet how to pass argument through shell and even how to modify my code so that it reads that passed parameter, still no good answer. Your suggestions are highly appreciated. It will help me learn the unix shell scripting as well.
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)
Hi,
I am looking for the unix script which can takes the 2 month old data from a TXT file (there is one txt file in whiche messages are appended on daily basis) and compress them into new file.Please halp me out. (2 Replies)
Here is the following code :
1.
# gcc -c test firstprog.c
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... (3 Replies)
Hi Experts,
can guide how we can Update a Database Table using a txt file source Using
Unix Shell Scripts.
What are the Cron Jobs codes can written to Update DB table.
txt file contains record like data.
US 09/03/2012 User DocType DocID.
these above feilds in txt files need to be updated in... (4 Replies)
Ok hope my vocab is right here, i'm trying to write multiple sets of arguments to another file for example:
I have a script that accepts four arguments and sends them to a another file
$write.sh it then out in
so the file receiver.txt would contain this:
it then out in
what... (2 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)
Hi,
I need help in writing a shell script which can read data from a text file (Cancel_ID.txt) and then calls sqlplus session (Cancel.sql) with the first line parameter of the text file ("0322600453") till all rows are not completed.
... (4 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)
i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies
LEARN ABOUT PHP
swfdisplayitem
SWFDISPLAYITEM(3) 1 SWFDISPLAYITEM(3)The SWFDisplayItem classINTRODUCTION
SWFDisplayItem.
CLASS SYNOPSIS
SWFDisplayItem
SWFDisplayItem
Methods
o
void SWFDisplayItem::addAction (SWFAction $action, int $flags)
o
void SWFDisplayItem::addColor (int $red, int $green, int $blue, [int $a])
o
void SWFDisplayItem::endMask (void )
o
float SWFDisplayItem::getRot (void )
o
float SWFDisplayItem::getX (void )
o
float SWFDisplayItem::getXScale (void )
o
float SWFDisplayItem::getXSkew (void )
o
float SWFDisplayItem::getY (void )
o
float SWFDisplayItem::getYScale (void )
o
float SWFDisplayItem::getYSkew (void )
o
void SWFDisplayItem::move (float $dx, float $dy)
o
void SWFDisplayItem::moveTo (float $x, float $y)
o
void SWFDisplayItem::multColor (float $red, float $green, float $blue, [float $a])
o
void SWFDisplayItem::remove (void )
o
void SWFDisplayItem::rotate (float $angle)
o
void SWFDisplayItem::rotateTo (float $angle)
o
void SWFDisplayItem::scale (float $dx, float $dy)
o
void SWFDisplayItem::scaleTo (float $x, [float $y])
o
void SWFDisplayItem::setDepth (int $depth)
o
void SWFDisplayItem::setMaskLevel (int $level)
o
void SWFDisplayItem::setMatrix (float $a, float $b, float $c, float $d, float $x, float $y)
o
void SWFDisplayItem::setName (string $name)
o
void SWFDisplayItem::setRatio (float $ratio)
o
void SWFDisplayItem::skewX (float $ddegrees)
o
void SWFDisplayItem::skewXTo (float $degrees)
o
void SWFDisplayItem::skewY (float $ddegrees)
o
void SWFDisplayItem::skewYTo (float $degrees)
PHP Documentation Group SWFDISPLAYITEM(3)