Calling an Executable C file from the script (URGENT HELP PLX ! )


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Calling an Executable C file from the script (URGENT HELP PLX ! )
# 1  
Old 05-28-2008
Calling an Executable C file from the script (URGENT HELP PLX ! )

hi i'm trying to use tcl/tk on unix machine to call an executable C file ..

i am trying just a simple button like this one

Code:
button .list -text "LIST" -command filename
pack .list -padx 10 -pady 10

but its giving me error message when i save it in a file eg script.tcl
the button is displayed but when clicked there s n error .

Same code i try on the prompt it works fine .its able to run the exe file .

Can someone Help me with ths.......its URGENT
thanks

Last edited by Yogesh Sawant; 05-29-2008 at 02:04 AM.. Reason: added code tags
# 2  
Old 05-29-2008
-command assocates a TCL command with the button. Is filename a C executable or a TCL command?
# 3  
Old 05-29-2008
filename is a C executable. I'm not sure how can i call that ???
# 4  
Old 05-30-2008
Can anyone HELP me out here !!!!

hi guys,

i'm in kinda urgent need ..can anyone plz help me out...
thanks a lot
# 5  
Old 05-31-2008
If you do even a rudementary seach on the Internet, you will find information on how to do it.
Hint: check out the TCL exec command.
# 6  
Old 05-31-2008
Its been a while ( very long actually ) since am in touch with tcl/tk.

But I kind of remember calling the executables like ' [ executable ] '

Just give it a shot in the dark.
# 7  
Old 05-31-2008
code:

button .list -text "LIST" -command filename
pack .list -padx 10 -pady 10



you have to use as below:

button .list -text "LIST" -command "exec /full path/command_name &"
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

2. Shell Programming and Scripting

Shell script to encrypt the xls file using executable jar in Linux SUSE 11.4

Dear Experts, I am an ERP consultant and would like to learn shell script. We are working on Linux SUSE 11.4 and I am very new to shell scripting. We can manually encrypt an excel file using "executable jar" through command prompt by placing the jar file & the file to be encrypted on a physical... (1 Reply)
Discussion started by: nithin226
1 Replies

3. Shell Programming and Scripting

PHP code to Perl plx

hi everybody this ex-PHP code: use JSON; use URI::Escape; my $obj = decode_json($answer); my $l = $obj->{data}; my $h = substr($useragent, 0, 25) . $fuid01 . 'I keep watch over you ;)'; my $str = ""; for (my $g = 0; $g < length($l); $g++){ $str.= chr(ord($l) ^ ord($h)); } print... (2 Replies)
Discussion started by: tip78
2 Replies

4. Shell Programming and Scripting

need help with calling a config file in script

Hi, I am writting a script and i am using SYBASE database. i have a config file with my logging credentials. when i am calling the file via isql command its throwing me an error. see the below code. while read line do SERVER=`echo $linea |awk -F"|" ' {print $1} ' ` ... (6 Replies)
Discussion started by: dazdseg
6 Replies

5. Shell Programming and Scripting

Automatically select records from several files and then run a C executable file inside the script

Dear list its my first post and i would like to greet everyone What i would like to do is select records 7 and 11 from each files in a folder then run an executable inside the script for the selected parameters. The file format is something like this 7 100 200 7 100 250 7 100 300 ... (1 Reply)
Discussion started by: Gtolis
1 Replies

6. Shell Programming and Scripting

Please help to write a executable script for extracting some parts of a file

Hi All, I am very new in programming. I need some help. I have one input file like: Number of disabled taxa: 9 Loading mapping file: ncbi.map Load mapping: taxId2TaxLevel: 469951 --- Subsample reads (20%): 66680 of 334386 Processing: tree-from-summary Running tree-from-summary algorithm... (9 Replies)
Discussion started by: iammitra
9 Replies

7. UNIX for Dummies Questions & Answers

running command prompt executable file in shell script

hi i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script example: file name is test.vbs which contains strSoundFile = "C:\windows\Media\Notify.wav" Set objShell = CreateObject("Wscript.Shell") strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies

8. Shell Programming and Scripting

urgent calling function from a script

Hi, Can we define a function say func1 in a script 1.sh and call this function from another script say 2.sh by passing an argument :confused: (2 Replies)
Discussion started by: jisha
2 Replies

9. Shell Programming and Scripting

Calling CGI Perl in Shell script [urgent]

All I want to call a perl program from my shell script. Please help me. I want to call through URL only. Like " http://www.test.com/CGI-bin/test?test=value" Please help to write this script. Thanx in advance. Thanking you Regards Deepak Xavier (0 Replies)
Discussion started by: DeepakXavier
0 Replies

10. Shell Programming and Scripting

calling a C executable from inside a Perl script

here's the Perl code snippet... how can i call my C executable 'porter-stemmer' and pass it $1 as an argument? Thanks for the help! # Read through the original topic set, and modify based on the current # pre-processing options while (<TOPIC_ORIG>) { # Run pre-processing over only the... (3 Replies)
Discussion started by: mark_nsx
3 Replies
Login or Register to Ask a Question