csh commands within csh scripts

Eric Magnusson ejmag at aplcen.apl.jhu.edu
Sat Nov 3 02:37:04 AEST 1990


I am having difficulty "alias"ing within a shell script.
When I execute the following script file (foo) I obtain the following error.
/bin/csh is my login shell.

/****** foo ******/
alias qqq ls

/****** error ******/
/bin/sh: alias: not found

 I then revised the script to be the following to use the c-shell.

/****** bar ******/
#!/bin/csh -f
alias qqq ls

The script executes fine, but the alias command does not seem to
be passed back to the parent shell.

How can I execute csh commands (like source and alias) within a shell 
script?

-- 
Eric Magnusson
ejmag at aplcen.apl.jhu.edu

I was Bourne, Bourne, Bourne .... Bourne to be alive!!!!



More information about the Comp.unix.shell mailing list