parameters from my program in c to a .ksh script


 
Thread Tools Search this Thread
Top Forums Programming parameters from my program in c to a .ksh script
# 1  
Old 05-09-2005
parameters from my program in c to a .ksh script

hi..

this is my question:

it is possible transfer parameters from my program written in C to a .ksh script?
how can i do it?

i have a program in C, what is called from a .ksh script, and i need what the C program returns some values (parameters)

please, help me - any idea
thanks

jona
# 2  
Old 05-09-2005
You know how to do stuff like
today=$(date)
echo $today
don't you? The date command just writes stuff to stdout. So you can do that too and capture the output the same way.
# 3  
Old 05-16-2005
and from ksh to c?

and how can i send arrays or variables from .ksh to my program in C???

is that possible??
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh processing options and parameters

I have a requirement where I need to process both options and parameters. command line call ie xxx.ksh -sid TEST1 -search_str LOCKED user1 user2 ..... I am using the following peice of code but I am usure how I can loop through all my parameters user1, user2, ... Note at the minium... (2 Replies)
Discussion started by: BeefStu
2 Replies

2. Shell Programming and Scripting

Why double quotation marks doesn't work in ksh function parameters passing?

I'm working on AIX 6, ksh shell. The parameters are some strings quotated by double quotation marks which from a file. They are quotated because there may be spaces in them. Example: "015607" "10" " " "A"I want to pass these parameters to a shell function by writing the following command: ... (4 Replies)
Discussion started by: Shimmey
4 Replies

3. Shell Programming and Scripting

ksh program

Hi, I have a text file with multiple sql statements in which I have pick only the below select update and delete statements and do print as given below. All the select,update,delete statements will be as same as ( subquery with ().all statements ending with ; ) the examples given below. 1)... (19 Replies)
Discussion started by: manasa_vs
19 Replies

4. Shell Programming and Scripting

convert ksh to C program

Hi Guys...is there a way to convert a .ksh script to .C program..? (3 Replies)
Discussion started by: aggars
3 Replies

5. UNIX for Dummies Questions & Answers

ksh: verifying number of parameters passed

hi all, i have a ksh script that takes up to 3 parameters -- only 2 of which are required. what's the simplest way to check if the user passed 2 or 3 parameters? if 3 parameters are not null then do this elif 2 parameters are not null then do this else echo "you need at least 2... (5 Replies)
Discussion started by: ankimo
5 Replies

6. Shell Programming and Scripting

BASH: how to launch a program with parameters

Hi, I'm a pretty big fan of BASH scripting. I've got a bunch I use for random things and lately a couple issues have been plaguing me. Both are somewhat related, in that they deal with filenames with spaces and "escaped" characters and with launching a program with command line arguements... (5 Replies)
Discussion started by: TinCanFury
5 Replies

7. Shell Programming and Scripting

ksh program with password

Hi, I am looking for a way to utilize password when the ksh program is launched. What's the standard or best way to do it? Thanks for your help! (5 Replies)
Discussion started by: cin2000
5 Replies

8. Programming

Passing Parameters and getting values back from a c program to Shell script

I am having a shell script which has to be called from a C program. I have to pass two parameters to this script. HOw can I do that? eg: int main() { char st1; char str2; // call a shell script call_sh(str1,str2) where call_sh is the name of the shell script. then i need to get the return... (5 Replies)
Discussion started by: Rajeshsu
5 Replies

9. Shell Programming and Scripting

Run a program and feed her parameters automaticly

How can I run a program ('prog') through perl (in unix) and feed her required parameters? system ("prog \n"); ????????? now 'prog' ask for parameters and I want the perl script to give them automaticly without humen intervention? (2 Replies)
Discussion started by: roco
2 Replies

10. UNIX for Advanced & Expert Users

date program in ksh

#Author : kkodava #!/usr/bin/ksh #Use of this program is You can findout the no of days & day of starting and ending dates #usage no_of_days startdate<yyyymmdd> enddate<yyyymmdd> syy=`echo $1|cut -c1-4` smm=`echo $1|cut -c5-6` sdd=`echo $1|cut -c7-8` eyy=`echo $2|cut -c1-4` emm=`echo... (1 Reply)
Discussion started by: krishna
1 Replies
Login or Register to Ask a Question