tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ nohup in ksh

Shell script with a timeout... ▻

How to run ksh program?? Please Help

In article <ofNM3.792$854.31768@burlma1-snr2>,
Barry Margolin  <barmar@bbnplanet.com> wrote:
>It isn't interpreted by the shell.  Comment lines like this are recognized
>by the kernel, and it uses them to determine which shell to run the script
>through.

Of course, it can be any program, not just a shell.  Scripts for
interpreters like Perl and TCL are typically started this way.

Here's my favourite; it's handy for storing bits of information you
refer to frequently.

    #! /bin/sed 1d
    If this file is made executable, running it will cause this text to
    be printed.  The first line, containing the `#!', will be stripped
    by `sed'; and the rest copied to standard output.

Tim.
--
Tim Goodwin   | "People think [ W. Gibson is ] hi-tech because his prose
Leicester, UK | is as pleasant to read as a C++ program." -- JT

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: How to run ksh program??  Please Help
Date: 13 Oct 1999 12:11:58 +0100
Organization: University of Leicester, UK
Message-ID: <7u1pek$52l$1@ltpcg.star.le.ac.uk>
References: <7tvptt$h5m$2@jaydee.iway.fr>
  <jdoherty-1210991240020001@192.168.2.42> <7u04t1$6qf$1@jaydee.iway.fr>
  <ofNM3.792$854.31768@burlma1-snr2>

△ comp.unix.shell △

◅ nohup in ksh

Shell script with a timeout... ▻