Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6368463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:40:43+00:00 2026-05-25T00:40:43+00:00

I am attempting to call a bash script from a TCL script and need

  • 0

I am attempting to call a bash script from a TCL script and need to get exit status from the bash script or at least pass something back into the TCL script so that I can tell if my script executed successfully. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:40:43+00:00Added an answer on May 25, 2026 at 12:40 am

    See http://wiki.tcl.tk/exec — click the “Show discussion” button — there’s a very detailed example of how to do exactly what you’re asking. What you need though is catch

    set status [catch {exec script.bash} output]
    
    if {$status == 0} {
        puts "script exited normally (exit status 0) and wrote nothing to stderr"
    } elseif {$::errorCode eq "NONE"} {
        puts "script exited normally (exit status 0) but wrote something to stderr which is in $output"
    } elseif {[lindex $::errorCode 0] eq "CHILDSTATUS"} {
        puts "script exited with status [lindex $::errorCode end]."
    } else ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time attempting to call an ASP.NET page method from jQuery.
I'm attempting to call a method written in C++/CLI from C#. The C++/CLI code
I am attempting to call an ASP.NET page from a classic ASP page on
I am getting an error when attempting to call a stored proc from my
I am attempting to call a C++ API from python. Following is the code
I'm attempting to call a phtml file from Ajax on the homepage of my
I am converting some php code into a Ruby script and I am attempting
I am attempting to call a C++ function in a DLL from C# via
I'm attempting to call startActivity(myIntent) from the click of a menu button but my
When attempting to call functions in math.h , I'm getting link errors like the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.