Alias in solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Alias in solaris
# 8  
Old 02-02-2010
Quote:
Originally Posted by pludi
The .aliased file will be sourced, so it has to be a valid shell script. That means you can't skip on declaring an alias explicitly as such.
Done it ,have to be like this right
Code:
alias c='clear'

# 9  
Old 02-09-2010
Alias no working in sh

Hi,
I have a another issue regarding the alias ,and still i have a question raised in this Forum and i don't want to post another question for the same issue, if I'm wrong i can ask this question separately

the issue is the alias working fine for only bash ,not on sh
since i created only .bashrc file i can see why it's working on bash only ,for sh i created the a separate .shrc file but it's not working there
any suggestion
# 10  
Old 02-23-2010
MySQL

you need to add your alias in to .bachrc file

the .bachrc file is in your home directory.

open the .bachrc file then add your alias in to the file

Example:

Code:
alias c='clear'
alias ls='ls -lrt'

Note: ctrl + l it will clear the screen.

after adding the line into your .bashrc file the alias is not work.
your shell need to re-read the .bashrc file.
so you need to execute the following command

Code:
$ . ~/.bashrc

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

IP Alias

Quick question Have a AIX system that has been up for years with a 192.9.x.x IP scheme and we want to add a second IP to the system. I setup the second IP 10.1.x.x as an alias via smit. Since these two IP's are on different VLANs will this be an issue? Reason I ask is that I cannot ping... (3 Replies)
Discussion started by: Chrisp
3 Replies

2. Solaris

How to set a global alias in UNIX Solaris?

Defined a user alias in unix. Not able to use that alias in a ksh scritp. I dont want to change/source in the script to set the value. Need to set the user alias as a gloabal alias to use it in a new ksh shell window. Can you please help on this? (3 Replies)
Discussion started by: rbalaj16
3 Replies

3. Shell Programming and Scripting

Not able to create alias in bash Sun solaris

Hello Friends, I am facing problem in creating aliases. I am working in SunOS 5.10. When I login in system i have been given ksh shell. What i am doing is that ? I am changing shell to bash then I am creating 2 alias in command prompt like: alias deploy_dir=' cd... (4 Replies)
Discussion started by: krsnadasa
4 Replies

4. 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

5. Solaris

Alias setting in Solaris

Hi All, I need some information on 'Alias' setting in SUN SOLARIS.:confused: Q1. I want to know how can i set my alias here. Q2. How to view all set 'ALIAS' for me. (say /home/jdash user) Q3. Can i modify the set 'Alias' for me or for whole environment. Q4. Is Alias setting can be change... (2 Replies)
Discussion started by: jdash.ps
2 Replies

6. UNIX for Dummies Questions & Answers

alias

Hi, I have created alias in UNIX environment (ie in .cshrc file). But when i use the alias in the UNIX script, getting an error message as that is not found. But when i use that alias, outside the script it is working fine. Let me know if you need more details For example: alias cderror... (6 Replies)
Discussion started by: Naveen_5960
6 Replies

7. UNIX for Dummies Questions & Answers

Help with Alias

Hi, I have a software package consisting of a group of BASH shell scripts. There is a master script which calls a series of subscripts. To run the software users must open the master script, modify and save it, and then run it. To open the script you can either double-click on it, or you can... (2 Replies)
Discussion started by: msb65
2 Replies

8. UNIX for Dummies Questions & Answers

alias help

Hello again, what does \!* do int his line alias lookup 'grep -i \!* who.is.who' Thanks! (1 Reply)
Discussion started by: kris888
1 Replies

9. Filesystems, Disks and Memory

alias

Hello, I'm trying to create an alias that will show the path name of a current directory when a user cd's into any directory. I have tried the following: alias cd ' cd | pwd ' This just lists the current directory, even when I cd to another directory the alias just lists my home... (6 Replies)
Discussion started by: klannon
6 Replies

10. UNIX for Dummies Questions & Answers

Alias

Hello, I'm a beginner to Unix and I want to create an alias that lists the given directory in long format; the alias should use a pager to display the result. Thanks in advance. (2 Replies)
Discussion started by: guelpth
2 Replies
Login or Register to Ask a Question