LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2015, 10:15 AM   #1
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Rep: Reputation: 5
New problem with aliases


I have many .bashrc aliases. When I used to type in an alias, it just executed the alias. Now something has changed. When I type in the alias, it prints the alias lines and then executes the commands:

alias cde='cd /etc/ && ls --color -a' #get to /etc

root@me~# cde
cd /etc/
ls --color -a
...into /etc and list of folders/files follows...

How can I stop the

cd /etc/
ls --color -a

from being displayed?

Thanks.
 
Old 02-04-2015, 11:33 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
I have read bash man page but the effect you are saying with alias is not documented there. May be I have missed it. Web search might help.
 
Old 02-04-2015, 11:34 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,959

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
Are all your commands being echoed back in that manner? That would indicate that you've set the "-v" option. Type "set +v" to turn it off.

On second thought, no, that wouldn't happen. The only other related option that I can think of is "-x", but with that the echoed lines would be prefixed with "+ ".

Last edited by rknichols; 02-04-2015 at 11:37 AM. Reason: second thought
 
Old 02-04-2015, 01:57 PM   #4
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Original Poster
Rep: Reputation: 5
That is apparently what happened. I tried to put in a command that had -x in it, but there were some additional single quotes in the string that I didn't see, so the -x was executed. After logging out and just now logging back in, the problem was gone - apparently resetting itself.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with postfix aliases ramesh14 Linux - Software 3 02-02-2011 05:29 AM
sendmail aliases problem csdhiman Linux - Server 1 10-26-2007 02:15 PM
wrap lines at 80 for long aliases in .aliases.csh jhwilliams Linux - Software 0 07-26-2007 08:49 AM
Apache Problem - Aliases Harlin Linux - Server 4 02-02-2007 06:26 PM
eth aliases problem Alexandre-BR Debian 1 10-21-2004 08:16 PM


All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration