Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2011
sourcing a file after redirecting (tcsh)
I have written a script that outputs a file with a bunch of aliases. What I want it to do is set those aliases in the same program, but I'm missing some fundamental piece of knowledge that would allow me to do this. While I can source the file from within the program, that clearly does not set the aliases in my current session.
Basically here's an abbreviated version of my script:
set file = ".$1_$2_aliases"
echo "## ALIASES FOR $2 ON $1" > $file
echo "echo SOURCED ALIASES FOR $2 ON $1" >> $file
echo "alias $3 cd /somedir/$1/somedir/$2/" >> $file
echo "alias $3 cd /somedir/$1/somedir/$2/somedir" >> $file
How would I make this work so that the aliases actually get set at the end of the program?
Last edited by stowaway; 02-25-2011 at 05:10 PM. Reason: clarity