🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
1 messages
1 total messages Started by David Goh Mon, 08 Dec 1997 00:00
Re: tin in script Q (suspension doesn't work)
#37498
Author: David Goh
Date: Mon, 08 Dec 1997 00:00
47 lines
1919 bytes
Argh.  I had to ignore the Followup-To header because we only have a
partial UUCP feed.  *sigh*  Oh well.  Posted *and* mailed as a result.
:-/

In news.software.readers, on 8 Dec 1997 06:04:45 GMT
andrew fabbro <NOSPAMafabbro@brokenarrow.us.itd.umich.edu> wrote:
>The script is basically:
>
>	#!/bin/sh
>	<change USER, echo change>
>	/usr/local/bin/bin -r
>	<change USER back to original, echo change>

You don't actually need to change USER back to the original, since any
environment variable modifications made inside a subshell do not
propogate to the parent shell.

So, you're probably better off doing:

=== begin ===
#!/bin/sh
# Set the USER environment variable.
USER=NOSPAM`whoami`@`domainname`
# export it, probably unnecessary, but good just in case.
export USER
# Print what we did.
echo Changed USER to "$USER"
# Exec the tin program.
exec /usr/local/bin/tin -r
=== end ===

That way, tin will replace the shell script under execution, but inherit
the newly modified USER variable.

Saves you a process too, which is a nice thing. :)

Later,

  David

-- 
Unico   Computer   Systems   Pty   Ltd
David Goh            Software Engineer
david@unico.com.au      (03) 9866 5688

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads