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

Problem with alias [Solved]

Postby mrizzone » Fri Apr 19, 2013 11:43

Hello! I did this:

http://sabayon.org/article/sabayon-%E2%80%93-keeping-it-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.
mrizzone
Simple Hen
 
Posts: 96
Joined: Sun Feb 10, 2013 23:56

Re: Problem with alias

Postby 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
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom


Re: Problem with alias

Postby 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’

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


Re: Problem with alias

Postby mrizzone » Sat Apr 20, 2013 1:13

Solved! I replaced for ' :oops:
mrizzone
Simple Hen
 
Posts: 96
Joined: Sun Feb 10, 2013 23:56

Re: Problem with alias [Solved]

Postby FaulesArschloch » Sun Apr 21, 2013 13:02

ha....made that same mistake, now it works :)
FaulesArschloch
Baby Hen
 
Posts: 6
Joined: Fri Apr 19, 2013 15:42


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: No registered users and 1 guest

cron