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

  • Home
  • SEARCH
  • 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 960605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:12:30+00:00 2026-05-16T01:12:30+00:00

Our ksh environment defines several functions. The names of these functions can be listed

  • 0

Our ksh environment defines several functions. The names of these functions can be listed using then typeset -f ksh command (or the functions alias). Is it possible to see the definition (ie source code) for these functions?

This seems like an obvious question, but I’ve tried all manner of parameters to typeset -f with no luck.

As an example (on Linux):

$ foo()
> {
>  echo foo
> }
$ foo
foo
$ typeset -f foo
foo
$

For some (but not all) other functions defined by default in the environment, typeset -f does show the source.

Update 1: This is happening with Linux kernel 2.4.21-32

Update 2: Update 2: Ctrl-V gives “Version M 1993-12-28 n+” – seems like this is quite an old version so might not have the fixes mentionned by Gilles below

Thanks,
Steve

  • 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-16T01:12:31+00:00Added an answer on May 16, 2026 at 1:12 am

    The question doesn’t mention the version of ksh but suggests an older version which may have a bug or limitation. Here are relevant extracts from the ksh93 changelog:

    08-01-31 — Release ksh93s+ —
    07-11-01 A bug in which typeset -f fun did not display the function definition
    when invoked in a subshell has been fixed.

    03-03-18 — Release ksh93o —
    03-02-28 All function definitions can be displayed with typeset -f not
    just those stored in the history file. In addition, typeset +f
    displays the function name followed by a comment containing the
    line number and the path name for the file that defined this function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our goal is simple for an iPhone app: show a splash page then hide
Our application is interfacing with a lot of web services these days. We have
Our company currently offers free sub-domains for redirects to our customers. These are quite
Our Flash game development portfolio can be seen here: http://www.letsdesign.co.uk/index.html Here is the CSS
Our team is currently using some ported code from an old architecture to a
Our team started using mercurial about a month ago and it was a rough
Our team is pretty new with testing. We are using scrum for the first
Our current Intranet environment is a little outdated. The current stack has ASP.NET 1.1/2.0
Our web application allows users to specify their own slugs which can include relative
Our C++ professor mentioned that using the result of operator-> as input into another

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.