Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bash aliases, and an X question

0 views
Skip to first unread message

Paul Kimoto

unread,
Aug 16, 2000, 3:00:00 AM8/16/00
to
In article <8nfflb$aa5$1...@nnrp1.deja.com>, Hammer wrote:
> Q2) bash aliases... is there a command separator for aliases?? So I
> could have an alias do multiple things... like a carrot or something -
>
> pushd^cd /var/log^pico boot.log &^popd
>
> Why can't I do that?? I have done man bash, man alias, etc... can't
> find it.

$ alias tto='echo this; echo that; echo other'
$ tto
this
that
other

--
Paul Kimoto
Disclaimer: Other than explicit citations of URLs, hyperlinks appearing
in this article have been inserted without the permission of the author.

Andrew N. McGuire

unread,
Aug 16, 2000, 3:00:00 AM8/16/00
to
On Thu, 17 Aug 2000, Hammer quoth:

~~ Date: Thu, 17 Aug 2000 01:37:49 GMT
~~ From: Hammer <hamm...@my-deja.com>
~~ Newsgroups: comp.os.linux.misc
~~ Subject: bash aliases, and an X question
~~
~~ I'm dumb, please don't hold that against me :)

[ snip ]

We all can be.

~~ Q1) I have some aliases and exported paths and such in my .bashrc and
~~ .bash_profile. Out of X, it all works. Everytime I go into X, I lose
~~ it all. How can that be?? Bash is bash, right? Any tips?? I did
~~ update my XFree from 3.3* to 4.0... I probably butchered some .x* config
~~ file, but I both fail to see why my bash environment is not carried into
~~ X, and why it's not repeated in X if the former occurs. Same profile
~~ files... any ideas what I'm doing wrong?? Thanks.

Put the line:

. ./.bash_profile # Or .bashrc or .profile or whatever

in your .xinitrc file.

After that 'ln -s .xinitrc .xsession', incase you use a display
manager, which you probably do.

~~ Q2) bash aliases... is there a command separator for aliases?? So I
~~ could have an alias do multiple things... like a carrot or something -
~~
~~ pushd^cd /var/log^pico boot.log &^popd

;

anm@hawk:~$ alias hello="echo hello; echo world"
anm@hawk:~$ hello
hello
world

[ snip ]

~~ If anyone remembers the old 4DOS command shell for DOS, it used the
~~ carrot as a command separator, and you could make some killer aliases.

I am glad I missed it! :-)

anm
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Andrew N. McGuire ~
~ anmc...@ce.mediaone.net ~
~ "Plan to throw one away; you will, anyhow." - Frederick P. Brooks, Jr. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Hammer

unread,
Aug 16, 2000, 9:37:49 PM8/16/00
to
I'm dumb, please don't hold that against me :)

Q1) I have some aliases and exported paths and such in my .bashrc and


.bash_profile. Out of X, it all works. Everytime I go into X, I lose

it all. How can that be?? Bash is bash, right? Any tips?? I did

update my XFree from 3.3* to 4.0... I probably butchered some .x* config

file, but I both fail to see why my bash environment is not carried into

X, and why it's not repeated in X if the former occurs. Same profile

files... any ideas what I'm doing wrong?? Thanks.

Q2) bash aliases... is there a command separator for aliases?? So I


could have an alias do multiple things... like a carrot or something -

pushd^cd /var/log^pico boot.log &^popd

Why can't I do that?? I have done man bash, man alias, etc... can't

find it. Do I have to define each alias individually and then write a
shell script to do it all?

If anyone remembers the old 4DOS command shell for DOS, it used the

carrot as a command separator, and you could make some killer aliases.

Thanks for any help :)

-=hammer

--
MC
"I've been trying to get as far away from myself as I can" - Bob Dylan


Sent via Deja.com http://www.deja.com/
Before you buy.

Hammer

unread,
Aug 16, 2000, 11:31:54 PM8/16/00
to
Bless you. Thanks!! I thought there had to be a way :)

-=hammer

In article <slrn8pmlfn...@adore.lightlink.com>,


kimoto...@lightlink.com wrote:
> In article <8nfflb$aa5$1...@nnrp1.deja.com>, Hammer wrote:

> > Q2) bash aliases... is there a command separator for aliases?? So
I
> > could have an alias do multiple things... like a carrot or
something -
> >
> > pushd^cd /var/log^pico boot.log &^popd
> >
> > Why can't I do that?? I have done man bash, man alias, etc... can't
> > find it.
>

> $ alias tto='echo this; echo that; echo other'
> $ tto
> this
> that
> other
>
> --
> Paul Kimoto
> Disclaimer: Other than explicit citations of URLs, hyperlinks
appearing
> in this article have been inserted without the permission of the
author.
>

--

-ljl-

unread,
Aug 18, 2000, 3:00:00 AM8/18/00
to hamm...@my-deja.com
In article <8nfflb$aa5$1...@nnrp1.deja.com>,

Hammer <hamm...@my-deja.com> wrote:
> I'm dumb, please don't hold that against me :)
>
> Q1) I have some aliases and exported paths and such in my .bashrc

You might want to explore bash's functions which are superior to
aliases. They are exportable too, export -f. See the man-page.

Guess GNU included alias support as a compatability move.
--
Louis-ljl-{ Louis J. LaBash, Jr. }

Hammer

unread,
Aug 18, 2000, 3:00:00 AM8/18/00
to
Thanks to all of you who responded to my querry... everything is
working great now :) Those were just two "niggle" things that were
annoyong me... no more! Brilliant.

I'll check out those bash functions, thanks.

-=hammer

In article <8njbai$m52$1...@nnrp1.deja.com>,


-ljl- <lla...@my-deja.com> wrote:
> In article <8nfflb$aa5$1...@nnrp1.deja.com>,
> Hammer <hamm...@my-deja.com> wrote:

> > I'm dumb, please don't hold that against me :)
> >
> > Q1) I have some aliases and exported paths and such in my .bashrc
>

> You might want to explore bash's functions which are superior to
> aliases. They are exportable too, export -f. See the man-page.
>
> Guess GNU included alias support as a compatability move.
> --
> Louis-ljl-{ Louis J. LaBash, Jr. }
>

0 new messages