🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.uu.comp.os.linux.questions
Article #143

Re: Can Red Hat Linux run Shell Script?

#143
From: 'Dungeon' Dave
Date: Sun, 29 Aug 1999 00:00
49 lines
2999 bytes
In article <7plmre$8e1$1@toto.tig.com.au>, Dominic Tse
<dominictse@netscape.net> writes
>Hi,
>
>I'm a newie of Linux. As I am currently studying Systems Programming 
>(Unix),
>I have installed Linux on my PC to practice and familiar with it. I am
>currently trying to run C shell script under the Linux. It seems to me that
>it doesn't like to execute the script although I've done "chmod u+x
>script_program". The error message is something like "command not 
>found".
>Can anyone please give me some ideas?
yeah.... are you actually running the c-shell as a login shell, or are
you in the Bourne Again (bash) or Korne (ksh) instead?

Is your shell script actually scripting language or a C program? I
just as many people think that they can use the C-shell as a C
interpreter and try to run C programs without compilation (can it be
done? I'm happy to be proved wrong!!)

Secondly, if you definitely want your script to execute in a c shell,
put the following in the first line:

#! /bin/csh

The #! specifies which shell the script should run in, the /bin/csh
is the path to the c shell (use the command "which csh" to find out
where yours is, it may be /usr/bin/csh etc).

Lastly: avoid calling your program SCRIPT or TEST - these are two
of the most common names used and are also reserved
keywords. I have made the same mistake myself many times!!

Also: is the script file located somewhere in your path? You
haven't placed the file somewhere where off the search path, have
you? Try "echo $PATH" and see if you've placed it in any of the
listed locations.
>
>--
>dom
>dominictse@netscape.net
>http://homepages.tig.com.au/~jtse/
>
>

-- 
 
Linux: love it or loathe it, it's here to stay!!
(I need a service pack for my tagline)
Technical Details
Message-ID: <2XJZDoAe1ay3EwzP@ghastly.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7plmre$8e1$1@toto.tig.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1101c9,d9db4d784d4d5b62
X-Google-Attributes: gid1101c9,public
X-Google-Thread: fcfb9,d9db4d784d4d5b62
X-Google-Attributes: gidfcfb9,public
X-Google-Thread: f9b51,d9db4d784d4d5b62
X-Google-Attributes: gidf9b51,public
X-Google-Thread: 10a997,d9db4d784d4d5b62
X-Google-Attributes: gid10a997,public
X-Google-Thread: 10d8ad,d9db4d784d4d5b62
X-Google-Attributes: gid10d8ad,public
X-Google-Thread: 102983,d9db4d784d4d5b62
X-Google-Attributes: gid102983,public
X-Google-Thread: fe2cf,d9db4d784d4d5b62
X-Google-Attributes: gidfe2cf,public
From: 'Dungeon' Dave <Dungeon@ghastly.demon.co.uk>
Subject: Re: Can Red Hat Linux run Shell Script?
Date: 1999/08/29
Message-ID: <2XJZDoAe1ay3EwzP@ghastly.demon.co.uk>
X-Deja-AN: 518640070
X-NNTP-Posting-Host: ghastly.demon.co.uk:193.237.153.154
References: <7plmre$8e1$1@toto.tig.com.au>
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 935964696 nnrp-13:27260 NO-IDENT ghastly.demon.co.uk:193.237.153.154
Organization: Blank
MIME-Version: 1.0
Newsgroups: alt.uu.comp.os.linux.questions,at.linux,aus.computers.linux,comp.os.linux.advocacy,comp.os.linux.setup,linux.redhat,uk.comp.os.linux