Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Sep 2001 09:56:12 -0400
From:      dochawk@psu.edu
To:        Ceri <ceri@techsupport.co.uk>
Cc:        Andre Cameron <camcom@optonline.net>, FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Shell scripts? 
Message-ID:  <200109111356.f8BDuD348212@fac13.ds.psu.edu>
In-Reply-To: Your message of "Tue, 11 Sep 2001 10:51:45 BST." <20010911105145.A1845@cartman.private.techsupport.co.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
ceri cried,

> On Tue, Sep 11, 2001 at 01:33:2C1AM -0400, Andre Cameron said:
> > Hey I just made l
> > which holds ls -al -color
> > then I chmod l to 777 in /bin and tried in /usr/bin and when I type l it
> > says command not found... In red hat if I hit l it would call my l script!
> > not that this is redhat:)  plus why no pico? vi is a pain:(  HELP PLEASE:)

> For your own good, may I suggest you immediately chmod 755 /usr/bin/l ?

!


> Also, is it just possible that the first line of l happens to be :

> #!/bin/bash   ?

> That's not going to work on FreeBSD (not on a default install, anyway).

Also, I suspect that Andre was using csh/tcsh, as bash finds the new 
ones on its own.

For something like this, though, an alias seems more reasoanble:

alias l "ls -al color"

You can put oodles of these into ~/.alias and add

if ( -e ~/.alias ) source ~/.alias

to .cshrc to cause it to be found at login.

And I dunno about one letter commands.  *real* commands are all two 
characgters (except for cat, which has special dispensation).  that 
mkdir and rmdir are 5 characters each is a long-standing bug which 
should really be acknowledged in the man pages . . .

hawk




-- 
Prof. Richard E. Hawkins, Esq.                  /"\   ASCII ribbon campaign 
dochawk@psu.edu  Smeal 178  (814) 375-4700      \ /   against HTML mail
These opinions will not be those of              X    and postings 
Penn State until it pays my retainer.           / \ 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109111356.f8BDuD348212>