FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 09-30-2010, 08:41 AM
Liam O'Toole
 
Default Alias definition

On 2010-09-29, David Jardine <david@jardine.de> wrote:
> On Wed, Sep 29, 2010 at 06:46:20PM +0100, abdelkader belahcene wrote:
>> hi,
>> by default I have to add option -lm to the command gcc -lm file.c
>> when I use math functions. Where can I configure gcc to add it to the
>> default gcc, after what I don't need the option -lm , just gcc file.c
>> thanks for help
>>
>
> You could add
>
> alias gcc='gcc -lm ' (note the last space)

What's the significance of the last space?

>
> to /etc/profile

<nitpick>
I would put the alias definition in /etc/bash.bashrc or ~/.bashrc
instead. It's a shell customisation, not an environment modification.
</nitpick>

--
Liam O'Toole
Cork, Ireland



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: slrnia8jaa.398.liam.p.otoole@dipsy.tubbynet">http://lists.debian.org/slrnia8jaa.398.liam.p.otoole@dipsy.tubbynet
 
Old 09-30-2010, 10:29 AM
David Jardine
 
Default Alias definition

On Thu, Sep 30, 2010 at 08:41:46AM +0000, Liam O'Toole wrote:
> On 2010-09-29, David Jardine <david@jardine.de> wrote:
> > [...]
> > You could add
> >
> > alias gcc='gcc -lm ' (note the last space)
>
> What's the significance of the last space?
>
> >

This, as far as I remember, allows the user to continue the command on
the command line.

> > to /etc/profile
>
> <nitpick>
> I would put the alias definition in /etc/bash.bashrc or ~/.bashrc
> instead. It's a shell customisation, not an environment modification.
> </nitpick>
>

I'm sure you're right.

Cheers,
David


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20100930102905.GA2090@gennes.augarten">http://lists.debian.org/20100930102905.GA2090@gennes.augarten
 

Thread Tools




All times are GMT. The time now is 12:20 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org