Simple shell procedure
Bernhard Weinelt
weinelt at sbsvax.cs.uni-sb.de
Tue Jul 10 04:11:01 AEST 1990
In article <WIZARD.90Jul8205942 at chemstor.uoregon.edu>, wizard at chemstor.uoregon.edu (KevinS) writes:
>
> Hello Netters, I have a need for a simple shell procedure that replaces
> a command line like :
> program < datafile.in > datafile.out
> So that all I have to do is type:
> shellprocedure datafile
>
> Kevins at ori.org
If you are using /bin/csh, you do not need a shellprocedure, try an alias:
alias start 'program <\!:1*.in >\!:1*.out' and type start datafile
In case of /bin/sh (or /bin/csh as well) the content of the shellprocedure
may look like
program <$1.in >$1.out then type shellprocedure datafile
Both solutions are trivial; take a look of the manual and you will find
how to use shell variables (from the command line, in your case).
Many Greetings Bernhard
--
------------------------------------
__________________ | Bernhard Weinelt |
(__) / \ | Universitaet des Saarlandes |
(oo) ( Many Greetings ) | FB 14 - Informatik (Dept. of CS) |
/-------\/ --'\__________________/ | Bau 36, Im Stadtwald 15 |
/ | || | D-6600 Saarbruecken 11, W-Germany|
* ||----|| | weinelt at cs.uni-sb.de |
~~ ~~ ------------------------------------
More information about the Comp.unix.questions
mailing list