Adam Turoff on Fri, 14 Jan 2000 13:57:47 -0500 (EST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] cshell scripts


> I have a script i have written, which takes everything on the command line
> from the user.
> Can someone give me an example of how to ask the user for input, and then
> use that in the script, because I have too much stuff to put in the command
> line now.

I tend to avoid csh these days.  Not sure about csh syntax, but this works
in the bourne shell (bash):

	#!/bin/sh

	## Quoting is optional here.
	echo Type something.
	read something
	echo You typed $something.

If you want to write shell scripts, you'd probably be better off scrapping
csh and writing your program in Perl.  Perl is better documented, richer
and more powerful than csh (not to mention easier to debug).

Z.


______________________________________________________________________
Philadelphia Linux Users Group       -       http://plug.nothinbut.net
Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce
General Discussion   -   http://lists.nothinbut.net/mail/listinfo/plug