Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ALIASES  sourcing .cshrc file

Posted on 1998-10-15
3
Medium Priority
?
315 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 200 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

718 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