From: Oliver Kiddle <opk@u.genie.co.uk>
To: "Cosgray, Nathan" <ncosgray@iupui.edu>
Cc: zsh-users@sunsite.auc.dk
Subject: Re: Help with functions
Date: Wed, 26 Apr 2000 20:40:51 -0400 [thread overview]
Message-ID: <39078C93.C97@u.genie.co.uk> (raw)
In-Reply-To: <154A66C813EED311AECB00508B8B8D093F459D@iupuimbx06.uits.iupui.edu>
Cosgray, Nathan wrote:
> Here is the problem that seems to be holding me back. To be as precise as
> possible, the makefile calls functions within a zsh script in the following
> manner:
> <file1>:
> ./run_masterfile_step get_file <param1> <param2>
> The zsh script run_masterfile_step contains about 25 functions defined like
> Now, I have never delved too deeply into shell scripting, but from what I
> can gather the idea behind this is that make calls the functions defined in
> run_masterfile_step.
What is happening here is that make is calling the run_masterfile_step
script with a number of parameters, the first of which is 'get_file' or
the name of some function. This does not implicitly mean that the
get_file function will be run. My guess is that run_masterfile_step
contained a line which looked something like:
$@
and that this line has been lost. This line substitutes any parameters
so would run a function if the first parameter named one.
Oliver Kiddle
>
> The problem is, none of this is working. make fails due to the fact that
> none of the functions provided by run_masterfile_step actually do anything.
> To experiment from the command line, I can type './run_masterfile_step
> <somefunction>' and nothing will happen (obviously I have closely examined
> the functions and I'm including valid parameters, referring to files that
> exist, etc.). I get no error messges, no output (all of the functions
> within the zsh script use echo's extensively to give feedback), and I notice
> no discernable processing time. I can easily tell what is supposed to
> happen from the script code but none of it is in fact happening. I can do a
> 'source run_masterfile_step' and then type '<somefunction>' and it will work
> properly, however. So I'm thinking there must be a problem with the way in
> which these functions are called. Unfortunately, I can't find any
> documentation that describes the syntax and rules for this. Does this
> problem have anything to do with the fact that these functions are
> indirectly called from make vs. from within zsh? Should these functions be
> split up into separate shell scripts?
>
> We currently have zsh 3.0.2 installed on SunOS 5.5 and 5.6 (varies by
> machine). I also compiled zsh 2.5.03 but it did not work as expected with
> these scripts, either. I have no way of knowing what version of zsh
> orginally ran these scripts years ago. I do know that they were used
> sucessfully for quite some time -- at least 3 years ending in November of
> 1998. I believe there have been some hardware and software upgrades since
> then but I'm not sure what could cause these scripts to break in such a
> fundamental way.
>
> I'm sure that I can rewrite or reorganize these scripts if I need to. But
> I'd just like to make sure there is nothing I can do to easily fix this.
> I'm also extremely confused about why this would no longer be working the
> way it was written. There must be something important I'm missing and I'd
> like to understand what that is.
>
> So. Any ideas or thoughts? Corrections of syntax? Version conflicts? Do
> you need more information, like the scripts themselves? Or at the least can
> you tell me where to go for zsh scripting documentation more detailed and
> complete than the man pages or that kept on http://www.zsh.org?
>
> Your help is very much appreciated.
>
> Thanks
>
> Nathan A. Cosgray, Database Administrator
> IUPUI Dept. of Medical Genetics
next prev parent reply other threads:[~2000-04-27 1:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-26 20:22 Cosgray, Nathan
2000-04-26 20:41 ` Thomas Köhler
2000-04-27 0:40 ` Oliver Kiddle [this message]
2000-04-26 21:02 Cosgray, Nathan
2000-04-27 16:00 Cosgray, Nathan
2000-04-27 20:18 Cosgray, Nathan
2000-04-28 15:15 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39078C93.C97@u.genie.co.uk \
--to=opk@u.genie.co.uk \
--cc=ncosgray@iupui.edu \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).