Associate
- Joined
- 24 Oct 2002
- Posts
- 2,371
- Location
- Cambridge
I've never really done much in the way of writing shell script on linux but I need to add a few lines to the .cshrc script but i'm having difficulty getting it working.
The users home directory the .cshrc file is in is on a mounted filesystem so the same profile can be used on multiple computers. However there is a load of code that I don't want to run when the user logs onto 1 machine in particular. I'm wanting to add something like this to the top of the .cshrc file but don't know the right syntax to do it and haven't had much success searching around the net.
if ($HOSTNAME=blahblahblah) then
exit script
end if
If anyone can give me a few likes of script that will do this it'll be much appreciated.
The users home directory the .cshrc file is in is on a mounted filesystem so the same profile can be used on multiple computers. However there is a load of code that I don't want to run when the user logs onto 1 machine in particular. I'm wanting to add something like this to the top of the .cshrc file but don't know the right syntax to do it and haven't had much success searching around the net.
if ($HOSTNAME=blahblahblah) then
exit script
end if
If anyone can give me a few likes of script that will do this it'll be much appreciated.