From: Henry Margies <henry.margies@gmx.de>
To: linux-c-programming@vger.kernel.org
Subject: Re: getdate(3) - format date
Date: Thu, 28 Sep 2006 09:38:43 +0200 [thread overview]
Message-ID: <1159429123.3898.4.camel@localhost.localdomain> (raw)
In-Reply-To: <200609261927.37275.hitoc_mail@yahoo.it>
On Tue, 2006-09-26 at 19:27 +0200, HIToC wrote:
> Hello Henry,
>
> I have used "sh": sh script
> But using ./script has the same problem: DATEMSK is not exported.
>
> Thank you for the emails
> HIToC
>
If you execute a script via sh script.sh or ./script.sh it is executed
in a sub shell. So every exported variable is only set in all sub-sub
shells.
Try this script to see what I mean
#!/bin/sh
export V=Test
echo $V
Now execute it in a sub shell:
sh script.sh
echo $V
and execute it in the current shell (via sourcing it)
. ./script.sh
echo $V
or
source script.sh
echo $V
Best regards,
Henry
prev parent reply other threads:[~2006-09-28 7:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-21 20:36 getdate(3) - format date HIToC
2006-09-22 7:28 ` Steve Graegert
2006-09-22 20:40 ` HIToC
2006-09-25 8:53 ` Henry Margies
2006-09-26 17:27 ` HIToC
2006-09-28 7:38 ` Henry Margies [this message]
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=1159429123.3898.4.camel@localhost.localdomain \
--to=henry.margies@gmx.de \
--cc=linux-c-programming@vger.kernel.org \
/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.
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).