Problem with alias [Solved]

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Post Reply
mrizzone
Simple Hen
Posts: 96
Joined: Sun Feb 10, 2013 23:56

Problem with alias [Solved]

Post by mrizzone » Fri Apr 19, 2013 11:43

Hello! I did this:

http://sabayon.org/article/sabayon-%E2% ... -date-tips
There is an easy way to save yourself from having to repeatedly do the commands over and over. Simple create yourself an alias. In your /root/ directory is a file called .bashrc (period means it’s hidden file) and you can edit that file to save some typing. Open the file up as root and go to the bottom of the file and enter in your alias word with command you want. Now you can call that command with a simple word and it will do it’s thing. So for example, I use the word world with a string of chain commands to perform my updates.

alias world=’equo update && equo install entropy equo && equo upgrade && equo deptest && equo conf update && equo libtest’
I replaced the word world for "upgrade"

after that, i get this message:

Code: Select all

xxx juan # upgrade
bash: $'\342\200\231equo': command not found
Could anybody please help me?
Last edited by mrizzone on Sat Apr 20, 2013 1:14, edited 1 time in total.

User avatar
Fitzcarraldo
Sagely Hen
Posts: 8094
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: Problem with alias

Post by Fitzcarraldo » Fri Apr 19, 2013 12:12

In a Konsole/Terminal window, log in as root user and enter the alias command by itself to list all the aliases. Paste the output here so that we can check if it is set up correctly.

Code: Select all

$ su
Password:
# alias
alias grep='grep --colour=auto'
alias ls='ls --color=auto'
#

User avatar
sabayonino
Sagely Hen
Posts: 3190
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: Problem with alias

Post by sabayonino » Fri Apr 19, 2013 14:58

Code: Select all

$'\342\200\231equo'
something is worng in .bashrc (root)
[Che Cos'è Il Calcolo Distribuito (BOINC)

BOINC ready ! Sabayon+BOINC = BILD ,my Sabayon spin :cyclops: - Ready to crunch for the Science everywhere :)

mrizzone
Simple Hen
Posts: 96
Joined: Sun Feb 10, 2013 23:56

Re: Problem with alias

Post by mrizzone » Fri Apr 19, 2013 19:01

Code: Select all

xxx juan # alias
alias grep='grep --colour=auto'
alias ls='ls --color=auto'
alias upgrade='’equo'
My .bashrc:

Code: Select all

# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output.  So make sure this doesn't display
# anything or bad things will happen !


# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
	# Shell is non-interactive.  Be done now!
	return
fi


# Put your fun stuff here.

alias upgrade=’equo update && equo install entropy equo && equo upgrade && equo deptest && equo conf update && equo libtest’


User avatar
sabayonino
Sagely Hen
Posts: 3190
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: Problem with alias

Post by sabayonino » Fri Apr 19, 2013 19:21

is this in /root/.bashrc or /home/<your_user>/.bashrc ??

alias upgrade = 'bla bla" must be put in /root/.bashrc
[Che Cos'è Il Calcolo Distribuito (BOINC)

BOINC ready ! Sabayon+BOINC = BILD ,my Sabayon spin :cyclops: - Ready to crunch for the Science everywhere :)

mrizzone
Simple Hen
Posts: 96
Joined: Sun Feb 10, 2013 23:56

Re: Problem with alias

Post by mrizzone » Sat Apr 20, 2013 1:13

Solved! I replaced for ' :oops:

FaulesArschloch
Baby Hen
Posts: 6
Joined: Fri Apr 19, 2013 15:42

Re: Problem with alias [Solved]

Post by FaulesArschloch » Sun Apr 21, 2013 13:02

ha....made that same mistake, now it works :)

Post Reply