Solved

ALIASES  sourcing .cshrc file

Posted on 1998-10-15
3
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

751 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