LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-14-2011, 11:07 AM   #1
patolfo
Member
 
Registered: Jan 2006
Distribution: Debian-Sarge r2-k.2.6.8-2.386
Posts: 101
Blog Entries: 1

Rep: Reputation: 15
bash functions within tcl script


Hi there huys i do have a new question for you

i have many functions in bash, and i am starting a new project where tcl is the call for it. Is there a way of calling these bash functions, within a tcl script instead of porting them.

i do know that to call a bash script you use exec bash_script, but what about a function inside a repertoire of functions, can they be sourced and called back in a tcl script?
 
Old 09-15-2011, 04:08 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 106Reputation: 106


To ensure portability you would have to nest the functions within the script.
 
Old 09-15-2011, 05:31 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Well my 2 cents is that if you are learning something new it might be an idea to try to port them over as it will give you better understanding of the new language.
In saying that, I would probably try this with some of the smaller ones and then import the bigger ones as required. The other advantage of porting is the new
language may have some performance enhancements over the old which may be advantageous to employ.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
help needed for two bash script functions. cybergirl01 Programming 6 12-06-2010 10:01 PM
[SOLVED] passing commands as arguments to functions in bash script mastahyeti Linux - General 3 05-31-2010 06:19 PM
Running functions in bash script as another user with su pwc101 Programming 5 12-13-2008 09:19 AM
Functions in bash script som_kurian Programming 3 01-01-2008 09:12 AM
Order of functions in a bash script essdeeay Programming 1 05-02-2006 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration