LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   query regarding setting up aliases and the "source" command (https://www.linuxquestions.org/questions/linux-newbie-8/query-regarding-setting-up-aliases-and-the-source-command-4175508411/)

suraj_thadarai 06-18-2014 02:30 PM

query regarding setting up aliases and the "source" command
 
Hi Guys,

I am using Red Hat Enterprise Linux 5 on
VMwareŽ Workstation Version 7.0.0 build-203739.

When i try to setup the alias in .bashrc file for rm command like this

alias rm = 'rm -i'


when running the .bashrc file through the source command system is throwing the message like below
[##################]$ source .bashrc
bash: alias: rm: not found
bash: alias: =: not found
bash: alias: rm -i: not found

MensaWater 06-18-2014 02:55 PM

There should be no space before or after the equal sign:

Enter:
alias rm='rm -i'

NOT:
alias rm = 'rm -i'

suraj_thadarai 06-23-2014 04:10 PM

thanks for the solution sir


All times are GMT -5. The time now is 11:03 AM.