[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Shell script help
- From: John Summerfield <summer OS2 ami com au>
- To: redhat-list redhat com
- Subject: Re: Shell script help
- Date: Thu, 1 Apr 1999 01:21:05 +0800 (WST)
On Wed, 31 Mar 1999, Paul F. Almquist wrote:
> >
> >
> > Am trying to write a bash cgi script which "echo"s a bunch of html stuff to
> > stdout, calls another script
You will find a contruct like this better than a bunch of echos:
cat <<ZZ
<HTML>
<HEAD>
<TITLE> Equityworld Closing Prices</TITLE>
</HEAD>
<table align=left cellspacing=0 cellpadding=0 border=0>
<TR valign=top>
<TD width=500>
<center><table border=0 >
<TR>
<TD width=140><font size=2><B>Company Name</B></font></TD>
<TD width=30><font size=2><B>Code</B></font></TD>
<TD width=40 align=right><font size=2><B>Open</B></font></TD>
<TD width=40 align=right><font size=2><B>High</B></font></TD>
<TD width=40 align=right><font size=2><B>Low</B></font></TD>
<TD width=40 align=right><font size=2><B>Close</B></font></TD>
<TD width=62 align=right><font size=2><B>Volume</B></font></TD>
<TD width=62 align=right><font size=2><B>Value</B></font></TD>
ZZ
then maybe some echos and
cat <<ZZ
</TR>
</table>
</BODY>
</HTML>
ZZ
Not you can have bash & envionment variables, and back-quoted commands in
the instream data.:
cat <<
`ls -l ~$LOGNAME`
ZZ
will work as expected.
> > and quits. I want the second script to run asychronously -but- to continue
> > running when the cgi script
> > quits. I thought of using "at" but is there a pure bash solution?
> >
> > TIA
> >
> start your second script with:
> command-to-start-script &
> or
> nohup command-to-start-script &
The at command is probably better though. I assume you want the second
script to run asynchronously because it's longer running or more demanding.
You probably don't want it being run at whatever priority is appropriate
for your server.
--
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]