Re: dot.bashrc, where is it?

2003-06-05 Thread John DeStefano

Chuck Swiger [EMAIL PROTECTED] wrote:
PPS: Anyone read this far?  More?  :-)

Sure!  Keep 'em coming! ;)
~John


-
Do you Yahoo!?
Free online calendar with sync to Outlook(TM).
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


dot.bashrc, where is it?

2003-06-04 Thread Didier Wiroth
Hi,

What do I have to install to have the:
/usr/share/skel/dot.bashrc sample file copied?
Or where can I download it?

I'm running 4.8-release.

Thanks a lot
Didier Wiroth

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dot.bashrc, where is it?

2003-06-04 Thread Lowell Gilbert
Didier Wiroth [EMAIL PROTECTED] writes:

 What do I have to install to have the:
 /usr/share/skel/dot.bashrc sample file copied?
 Or where can I download it?

There isn't one, by default.  I created my own, for things where I
didn't like the default behaviour of bash, but you don't actually need
a .bashrc at all.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: dot.bashrc, where is it?

2003-06-04 Thread Didier Wiroth
Hi,
Thanks for answering!
I know it isn't needed, but as I'm a beginner I would really like to have a
sample to customize and learn, that's why I asked
The PATH variables etc..,

Didier

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Lowell Gilbert
Sent: mardi 3 juin 2003 15:05
To: Didier Wiroth
Cc: [EMAIL PROTECTED]
Subject: Re: dot.bashrc, where is it?


Didier Wiroth [EMAIL PROTECTED] writes:

 What do I have to install to have the: /usr/share/skel/dot.bashrc 
 sample file copied? Or where can I download it?

There isn't one, by default.  I created my own, for things where I didn't
like the default behaviour of bash, but you don't actually need a .bashrc at
all.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


FW: dot.bashrc, where is it?

2003-06-04 Thread Didier Wiroth
Hi,
Thanks for answering!
I know it isn't needed, but as I'm a beginner I would really like to have a
sample to customize and learn, that's why I asked The PATH variables etc..,

Didier

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Lowell Gilbert
Sent: mardi 3 juin 2003 15:05
To: Didier Wiroth
Cc: [EMAIL PROTECTED]
Subject: Re: dot.bashrc, where is it?


Didier Wiroth [EMAIL PROTECTED] writes:

 What do I have to install to have the: /usr/share/skel/dot.bashrc
 sample file copied? Or where can I download it?

There isn't one, by default.  I created my own, for things where I didn't
like the default behaviour of bash, but you don't actually need a .bashrc at
all.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dot.bashrc, where is it?

2003-06-04 Thread Lowell Gilbert
Didier Wiroth [EMAIL PROTECTED] writes:

 Thanks for answering!
 I know it isn't needed, but as I'm a beginner I would really like to have a
 sample to customize and learn, that's why I asked
 The PATH variables etc..,

Okay, well, my version is:



# default .bashrc for be-well.ilk.org
# adapted from Lowell's .bashrc as of 17/March/2001
#

#
# A bunch of local aliases, mostly as examples
#
alias   ls='ls -F'
alias   xstart='startx -- -bpp 16'


# Set a simple prompt
PS1='[\!] \W ' ; PS2='  \W '

# set up Bash to not save repeated command lines
HISTCONTROL=ignoreboth
## emacs for an editor...
export EDITOR=emacs
## home machine's firewall stops FTP Port commands
export  FTP_PASSIVE_MODE=YES

if [ -f ~/.bash_path ] ; then source ~/.bash_path ; fi
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dot.bashrc, where is it?

2003-06-04 Thread Gary Jennejohn

Didier Wiroth writes:
 Hi,
 
 What do I have to install to have the:
 /usr/share/skel/dot.bashrc sample file copied?
 Or where can I download it?
 
 I'm running 4.8-release.
 

There is no default .bashrc. You have to make your own. bash is
optionally installed by the user and is not part of the base system,
that's why no dot.bashrc is included with FreeBSD (this isn't
Linux).

---
Gary Jennejohn / [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: dot.bashrc, where is it?

2003-06-04 Thread Didier Wiroth
Hi,
Thanks, I know this isn't linux!

I'm asking because I'm reading The Complete Freebsd, 4th Edition book, at
page 94 Changing the default shell for root there is a comment:
After installation, you may want to change the default shell... Bash... If
you have installed instant-workstation, you should copy the file
/usr/share/skel/dot.bashrc to root's home directroy and call...

I had a look at the Makefile of the /usr/ports/misc/instant-workstation
port. I can't figure out where or how this file (dot.bashrc) could have been
installed from this port?! I have the bash2 shell pkg/port installed and in
my mind, this is the only port where the dot.bashrc file could be installed,
but this isn't obviously the case. 

For a beginner (coming from a windows world) who doesn't know which shell is
better, sorry more adequate, it is easier to have a sample config file, to
start learning how to configure you shell!

Didier

-Original Message-
From: Gary Jennejohn [mailto:[EMAIL PROTECTED] 
Sent: mardi 3 juin 2003 15:22
To: Didier Wiroth
Cc: [EMAIL PROTECTED]
Subject: Re: dot.bashrc, where is it? 



Didier Wiroth writes:
 Hi,
 
 What do I have to install to have the: /usr/share/skel/dot.bashrc 
 sample file copied? Or where can I download it?
 
 I'm running 4.8-release.
 

There is no default .bashrc. You have to make your own. bash is optionally
installed by the user and is not part of the base system, that's why no
dot.bashrc is included with FreeBSD (this isn't Linux).

---
Gary Jennejohn / [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: dot.bashrc, where is it?

2003-06-04 Thread Sondre Rønjom
On Tue, 3 Jun 2003, Didier Wiroth wrote:

 After installation, you may want to change the default shell... Bash... If
 you have installed instant-workstation, you should copy the file
 /usr/share/skel/dot.bashrc to root's home directroy and call...
... it '.bashrc' ?


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dot.bashrc, where is it?

2003-06-04 Thread Jim Trigg
On Tue, Jun 03, 2003 at 04:04:53PM +0200, Didier Wiroth wrote:
 
 I'm asking because I'm reading The Complete Freebsd, 4th Edition book, at
 page 94 Changing the default shell for root there is a comment:
 After installation, you may want to change the default shell... Bash... If
 you have installed instant-workstation, you should copy the file
 /usr/share/skel/dot.bashrc to root's home directroy and call...
 
 I had a look at the Makefile of the /usr/ports/misc/instant-workstation
 port. I can't figure out where or how this file (dot.bashrc) could have been
 installed from this port?! I have the bash2 shell pkg/port installed and in
 my mind, this is the only port where the dot.bashrc file could be installed,
 but this isn't obviously the case. 

instant-workstation is a meta-port that causes other ports, including bash2,
to be installed.

Jim
-- 
Jim Trigg, Lord High Everything Else  O-  /\
  \ /  ASCII RIBBON CAMPAIGN
Hostmaster, Huie Kin family websiteXHELP CURE HTML MAIL
Verger, All Saints Church - Sharon Chapel / \
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dot.bashrc, where is it?

2003-06-04 Thread Robert Storey
On Tue, 3 Jun 2003 16:04:53 +0200
Didier Wiroth [EMAIL PROTECTED] wrote:


 For a beginner (coming from a windows world) who doesn't know which shell is
 better, sorry more adequate, it is easier to have a sample config file, to
 start learning how to configure you shell!
 
 Didier

Dear Didier,

Here's what I've put in my ~/.bashrc for all users (including root):

  alias rm='rm -i'
  alias cp='cp -i'
  alias mv='mv -i'
  set -o noclobber


While you're at it, here's what I added to ~/.profile for everybody as well:

  PS1=[EMAIL PROTECTED]:\w 
  export PS1

Let us know if you have any specific questions about what these commands do.

regards,
Robert



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dot.bashrc, where is it?

2003-06-04 Thread Chuck Swiger
On Tue, 3 Jun 2003 16:04:53 +0200
Didier Wiroth [EMAIL PROTECTED] wrote:
[ ... ]
For a beginner (coming from a windows world) who doesn't know which shell is
better, sorry more adequate, it is easier to have a sample config file, to
start learning how to configure you shell!
Hi, Didier--

The standard shell under FreeBSD is the Bourne shell, or /bin/sh. (*)  It's 
useful to know if only for the sake of comparison to other shells, since it's 
the standard reference.

BASH is closely related to the classic Bourne shell, and is sometimes installed 
as /bin/sh on some platforms-- various Linux flavors, mostly.  The Korn shell, 
/bin/ksh or pdksh, is also compatible with the Bourne shell syntax and added 
named procedures, and was heavily used by SysV Unices like Solaris, particularly 
in their package installation and system startup scripts.  I believe Microsoft 
also picked up a slightly(?) broken version of KSH for their POSIX environment 
under Windows NT and later.

Finally, I happen to use and recommend the Z Shell (/bin/zsh), which is being 
used as the default shell under Darwin and MacOS X; like bash, you can even 
install ZSH in place of /bin/sh.  ZSH can emulate sh, bash, ksh, and even the 
csh/tcsh shells, and thus is one of the most configurable shells available.

As you may have gathered, there are two major groupings of shells, the /bin/sh 
family described above, and a second grouping consisting of the C shell 
(/bin/csh) and derivatives like /bin/tcsh, which is what FreeBSD comes with as 
an alternative to /bin/sh.  At one time, /bin/sh was intended for shell scripts 
and was poorly suited for interactive use; /bin/csh was created with a lot more 
features and was more usable than the classic /bin/sh.

-
(*): FreeBSD now uses something called the Ash shell as /bin/sh, which targets 
the POSIX shell standard and thus includes a number of interactive features that 
people like-- command.com + DOSKEYS? in Didier's frame of reference.  These 
include command history, interactive filename completion, job control, named 
procedures, fancier substitution and env variable handling, etc.
-

Unfortunately, /bin/csh suffered from a misguided attempt to blend the syntax of 
the C programming language with the Bourne shell syntax, and is not recommended 
for scripting use.  (From the vantage of hindsight, horribly misguided attempt 
might be more accurate. :-)  Also, trying to learn both SH and CSH at the same 
time is likely to be very confusing due to these differences.

--
-Chuck
PS: Here's some sample system-wide shell script examples:

# /etc/profile: system wide startup file for /bin/sh and friends.
#
#
# This file sets critical environment variables exported to all processes,
# such as the search path, user identity, process limits, umask, etc.
#
# Important:  This file must not produce any output!  Do **NOT** assume
# the shell is interactive or attached to a terminal (tty).
#
# Copyright (c) 2003 Charles Swiger [EMAIL PROTECTED]
# $Id: profile,v 1.3 2003/05/16 04:03:28 chuck Exp $


# ignore signals
trap  2 3
# Default permissions.
umask 022
# Set reasonable soft process limits.
ulimit -Sc 0
ulimit -Sd 512000
ulimit -Ss 16384
ulimit -Sn 256
ulimit -Su 100
# Please note: Most platforms have the system hard resource limits
# configured via OS-specific files like /etc/login.conf (BSD),
# /etc/system (Solaris), compilation-time configuration of /etc/init,
# /bin/sh, and/or the kernel.  That is to say, changing the values
# above without also tuning other aspects of the system-- appropriate
# to the situation-- may not produce the results one would expect.

# Configure critical environment variables.
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
export PATH
# setup (unqualified) hostname if we can, else localhost
if [ $HOST =  ]; then
HOST=`hostname | awk -F. '{print $1}'`
if [ $HOST =  ]; then
HOST=localhost
fi
fi
export HOST
# setup username
if [ $USER =  ]; then
USER=`id -un`
if [ $USER =  ]; then
USER=`whoami`
fi
fi
export USER
UNAME_P=`uname -p`; export UNAME_P
UNAME_S=`uname -s`; export UNAME_S
BLOCKSIZE=K; export BLOCKSIZE # inndf ergo sum
RSYNC_RSH=ssh; export RSYNC_RSH
CVS_RSH=ssh; export CVS_RSH
# Add other protocols which can tunnel via rsh or ssh here.  Per IESG
# recommendations, unencrypted plain text passwords should be avoided.

# look for per-platform, per-machine, or per-user localizations
if [ -r /etc/profile.$UNAME_S ]; then
. /etc/profile.$UNAME_S
fi
# Note: it might be reasonable to replace elif with fi;if
if [ -r /etc/profile_localhost ]; then
. /etc/profile_localhost
elif [ -r /etc/profile_$HOST ]; then
. /etc/profile_$HOST
fi
if [ -r /etc/profile_$USER ]; then
. /etc/profile_$USER
fi

# If this is a login or su - shell, perform more expensive tasks (once).
# Note: do not enable a