The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Please Help Me Guys zanetti321 UNIX for Advanced & Expert Users 8 03-02-2008 11:15 AM
Hi guys... vinayraj UNIX for Advanced & Expert Users 1 02-07-2008 11:37 PM
Help guys! chuchu Shell Programming and Scripting 2 07-06-2007 06:52 AM
Thanks guys b_manu78 AIX 0 01-03-2006 06:43 AM
i need your guys help souldier UNIX for Advanced & Expert Users 21 03-29-2002 07:26 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-18-2002
Nisha Nisha is offline
Registered User
  
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
Thumbs up TCL/TK - Help Guys

Hi Folks,

I would like to know something abt TCL/TK. For those who dont know the expansion of it...here it goes TCL - Tool Command Language and TK - Tool Kit..

It can be used to write shell scripts, application programs using TCL and gui applns using TK.

For unix, we write tclsh shell scripts.. and also VTCL i.e., Visual TCL.

I want to know more abt TCL/TK. Some say that it is useful in System level programming in C.

Any help would be appreciated.

P.S. I dont know in which section should i post this thread whether in C programming or Unix Shell script.

Thanks,
Nisha
  #2 (permalink)  
Old 07-18-2002
killerserv's Avatar
killerserv killerserv is offline Forum Advisor  
Unix Predator
  
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
Tcl in C has syntax for grouping, which allows multiple words in one argument, and substitution, which is used with programming variables and nested command calls. The Tcl interpreter does grouping first, then substitutions, and finally it calls the command. It is up to the command to interpret its arguments

Ex Tcl in C:

Code:
Write command procedure in C: 
 int EqCmd(ClientData clientData, Tcl_Interp
        *interp, int argc, char **argv) {
    if (argc != 3) {
        interp->result = "wrong # args";
        return TCL_ERROR;
    }
    if (strcmp(argv[1], argv[2]) == 0) {
        interp->result = "1";
    } else {
        interp->result = "0";
    }
    return TCL_OK;
 }

Interfaces to C are simple, Tcl was designed to make this true &
the focus on primitives, which use Tcl scripts to compose fancy features. All the need is in between how you catchup with it.
  #3 (permalink)  
Old 07-18-2002
Nisha Nisha is offline
Registered User
  
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
Thumbs up

Can we do System Level Programming in C with TCL/TK???


Thanks,
Nisha

  #4 (permalink)  
Old 07-18-2002
killerserv's Avatar
killerserv killerserv is offline Forum Advisor  
Unix Predator
  
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
yes can. Try view this site for more information.

http://www.tcl.tk/doc/scripting.html
  #5 (permalink)  
Old 07-18-2002
Nisha Nisha is offline
Registered User
  
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
Lightbulb

Hey thanks killerserv!!!

Looks like i will get more doubts once i get deep into it.

Can anyone send me a sample system level programming using C???

would be of a great help...


Thanks,
Nisha

Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0