Solved

ALIASES  sourcing .cshrc file

Posted on 1998-10-15
3
282 Views
Last Modified: 2010-04-21
i would like to know how to setup an alias that will go from the current directory to home dir and source the .cshrc file and return to the original working directory

eg.
I'm in /Home/MyDirectory

to source, I need to go to the /Home directory

and then I want to go back to /Home/MyDirectory automatically.
0
Comment
Question by:ShannonBoy
3 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2007423
alias setup 'pushd /Home;source .cshrc;popd'
0
 
LVL 1

Accepted Solution

by:
vulkanr earned 50 total points
ID: 2007424
what's wrong with : alias x "source ~/.cshrc" ??

anyway, if this was not the meaning, try:
alias x "(cd ; source .cshrc)"

the ( ) will cause the commands to run under the same process and when it terminates you will get back where you were.
0
 

Author Comment

by:ShannonBoy
ID: 2007425
ozo your comment doesnt work sorry...

but vulkanr solved it excellent, thank bud!!!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now