alias is ksh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting alias is ksh
# 1  
Old 01-06-2011
alias is ksh

Hello,

I am trying to create alias in ksh.

alias m=main.ksh

It's working just fine but when I log out from my session and relogin the alias is gone.

How can i create a permanent alias?

Thanks...
# 2  
Old 01-06-2011
Set it in your .profile

Code:
alias m='/path/to/script'

Logout and login again to permanently set it in your environment.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to pass a parameter to an alias in ksh?

I want to do something like this: alias cd2="cd /data_saves/$(/opt/bin/util/getcustdb -i $@)" Where /opt/bin/util/getcustdb is an inhouse script to lookup customer db name based on a provided id number Then when I use the alias I can cd2 4567 and have it run "/opt/bin/util/getcustdb -i... (3 Replies)
Discussion started by: JourneyRider
3 Replies

2. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

3. Shell Programming and Scripting

how can I export an alias and use it in any shell that I want to switch to like bash, ksh

None of the aliases that I set are available if I switch to a different shell. How can I export aliases and make them available in any shell that I switch to like ksh or bash ? I tried these $>alias godata='cd /home/kc/app/data' $>alias -x godata='cd /home/kc/app/data' $>alias |... (2 Replies)
Discussion started by: kchinnam
2 Replies

4. Shell Programming and Scripting

Alias a full path in ksh

Hi again, Maybe a stupid question but I don't know how to solve it.. I want to alias a full_PATH_command.. I mean: /usr/bin/df -Ik TO sudo /usr/bin/df I used alias df='sudo df' but the command run is /usr/bin/df.. Any idea on how to make this alias? Thanks (2 Replies)
Discussion started by: iga3725
2 Replies

5. Shell Programming and Scripting

created a .alias, but they won't take (ksh)

I login with a common username, and have no access to the different login scripts for my personalizations. So for a while, I would hobble on over to a directory I made for myself, and then bring in my alias file where I would fix my backspace, create a few aliases, etc.: $ ./.alias $ Now... (4 Replies)
Discussion started by: hindesite
4 Replies

6. UNIX for Dummies Questions & Answers

alias in ksh

Hi all, I want to create my own set of alias, possibly place them on a script that I can run manually as a script. I've placed the sequence of alias commands in a file then I logoff and login and run the script manually. That does not seem to work, can anyone please advise how to get this work... (2 Replies)
Discussion started by: newbie_01
2 Replies

7. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

8. UNIX for Dummies Questions & Answers

alias

i used 'alias' command for a set of daily used long commands. But i noticed they are gone once i log out of the ssh session. Can any one plz let me know if there is a way to set it permanently for my user. (1 Reply)
Discussion started by: pharos467
1 Replies

9. Shell Programming and Scripting

please help me regarding alias

Dear All, I have given alias to run a script which will calculate memory and cpu utilization as "utils" in my bash shell. Even i have given this entry in .profile and .bashrc in my home directory. It is working fine. Now my question is that I want to use this alias in... (17 Replies)
Discussion started by: naree
17 Replies

10. Shell Programming and Scripting

Alias

how implement functionality alias in the same way as in csh? (use Bourne type sh or bash) (3 Replies)
Discussion started by: sunhata
3 Replies
Login or Register to Ask a Question