Re: cshrc to bashrc??

2011-01-01 Thread Polytropon
On Fri, 31 Dec 2010 13:15:45 -0800, Gary Kline kl...@thought.org wrote:
   Anybody know if there is a utility that transforms the /root/.cshrc
   into a bash RC file?After decades, I'm giving up on the csh stuff.
   Need something simpler.

As far as I know, there is no automatic converter for csh - sh
config files. Basically, the C shell has these:
- system-wide:
  /etc/csh.cshrc, /etc/csh.login, /etc/csh.lougout
- per user:
  ~/.cshrc, ~/.login, ~/.logout
I'm a csh user for most dialog use, because bash's interactive
abilites force too much interaction (especially regarding
completition) in the default configuration. But I'm more and
more thinking to switch to bash permanently, as soon as I've
beaten bash's misbehaviour out of its source code. :-)

The system's sh uses /etc/profile and .profile in the same
manner. Then there is bash, which I think uses the following
files according to man bash, section FILES:

/etc/profile
The systemwide initialization file,
executed for login shells
~/.bash_profile
The personal initialization file,
executed for login shells
~/.bashrc
The individual per-interactive-shell startup file
~/.bash_logout
The individual login shell cleanup file,
executed when a login shell exits
~/.inputrc
Individual readline initialization file

You have to know about the different syntax definition for
both file types, but it's relatively easy.

setenv ENVNAME envstring- ENVNAME=envstring; export ENVNAME
- export ENVNAME=envstring

set VARNAME = 'varstring'   - VARNAME=varstring

alias aliname 'alistring'   - alias aliname=alistring

All the config files allow regular sh coding sequences (such
as the use of conditionals or iterators).

To get a standard prompt in bash, use this:

export PS1=\...@\h:\w\$ 

It is the equivalent to csh's

set promptchars = %#
set prompt = %...@%m:%~%# 

Note that csh does automatically use % or # according to the
first setting. I'm not sure how bash handles this.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cshrc to bashrc??

2011-01-01 Thread Gary Kline

I've read about 30% of your email and just have to sack out. It
is just past 04:00 and my eyes are starting to glue shut.  And
hey, once them shut, I'll bang into stuff before I can get to my
bed!!

More coming tomooor-- Hm.  Since this *is* tomorrow,
then in around some N hours.

S'all, folks!

-g


On Sat, Jan 01, 2011 at 11:01:31AM +0100, Polytropon wrote:
 On Fri, 31 Dec 2010 13:15:45 -0800, Gary Kline kl...@thought.org wrote:
  Anybody know if there is a utility that transforms the /root/.cshrc
  into a bash RC file?After decades, I'm giving up on the csh stuff.
  Need something simpler.
 
 As far as I know, there is no automatic converter for csh - sh
 config files. Basically, the C shell has these:
   - system-wide:
 /etc/csh.cshrc, /etc/csh.login, /etc/csh.lougout
   - per user:
 ~/.cshrc, ~/.login, ~/.logout
 I'm a csh user for most dialog use, because bash's interactive
 abilites force too much interaction (especially regarding
 completition) in the default configuration. But I'm more and
 more thinking to switch to bash permanently, as soon as I've
 beaten bash's misbehaviour out of its source code. :-)
 
 The system's sh uses /etc/profile and .profile in the same
 manner. Then there is bash, which I think uses the following
 files according to man bash, section FILES:
 
   /etc/profile
   The systemwide initialization file,
   executed for login shells
   ~/.bash_profile
   The personal initialization file,
   executed for login shells
   ~/.bashrc
   The individual per-interactive-shell startup file
   ~/.bash_logout
   The individual login shell cleanup file,
   executed when a login shell exits
   ~/.inputrc
   Individual readline initialization file
 
 You have to know about the different syntax definition for
 both file types, but it's relatively easy.
 
 setenv ENVNAME envstring  - ENVNAME=envstring; export ENVNAME
   - export ENVNAME=envstring
 
 set VARNAME = 'varstring' - VARNAME=varstring
 
 alias aliname 'alistring' - alias aliname=alistring
 
 All the config files allow regular sh coding sequences (such
 as the use of conditionals or iterators).
 
 To get a standard prompt in bash, use this:
 
   export PS1=\...@\h:\w\$ 
 
 It is the equivalent to csh's
 
   set promptchars = %#
   set prompt = %...@%m:%~%# 
 
 Note that csh does automatically use % or # according to the
 first setting. I'm not sure how bash handles this.
 
 
 
 -- 
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.97a release of Jottings: http://jottings.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cshrc to bashrc??

2011-01-01 Thread Chris Brennan

  Note that csh does automatically use % or # according to the
  first setting. I'm not sure how bash handles this.


man bash and search for PROMPTING, everything you can pass PS1 is there

# is \# the command number of this command

I don't see how a '%' is handled tho, what does it do is csh? I (or someone
else) may know the bash equivalent...


C-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cshrc to bashrc??

2011-01-01 Thread Polytropon
On Sat, 1 Jan 2011 10:56:24 -0500, Chris Brennan xa...@xaerolimit.net wrote:
 
   Note that csh does automatically use % or # according to the
   first setting. I'm not sure how bash handles this.
 
 
 man bash and search for PROMPTING, everything you can pass PS1 is there
 
 # is \# the command number of this command
 
 I don't see how a '%' is handled tho, what does it do is csh? I (or someone
 else) may know the bash equivalent...

The csh and bash config do use differnt escape sequences
for substitution, such as user name, host name, current
directory and power (root / non-root). In bash it is \,
in csh it is %.

You are right, man bash does list all the sequences,
as well as man csh. For the standard prompt

u...@host:~/my/path% _

those are the corresponding codes:

Meaning csh bash
--  --  --
user%n  \u
host%m  \h
path\w  %~  (includes substitution ~)
prompt sign %#  (# for root, % for non-root)
\$  (# for root, $ for non-root)

That's why I said csh's set prompt = %...@%m:%~%#  equals
bash's export PS1=\...@\h:\w\$ , because bash does have a
different default prompt (which might not be desired).

A literal % can be used for bash's PS1 setting if intended.
But it's okay to see $ for bash, and % for csh.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: cshrc to bashrc??

2011-01-01 Thread Gary Kline
On Sat, Jan 01, 2011 at 11:01:31AM +0100, Polytropon wrote:
 On Fri, 31 Dec 2010 13:15:45 -0800, Gary Kline kl...@thought.org wrote:
  Anybody know if there is a utility that transforms the /root/.cshrc
  into a bash RC file?After decades, I'm giving up on the csh stuff.
  Need something simpler.
 
 As far as I know, there is no automatic converter for csh - sh
 config files. Basically, the C shell has these:
   - system-wide:
 /etc/csh.cshrc, /etc/csh.login, /etc/csh.lougout
   - per user:
 ~/.cshrc, ~/.login, ~/.logout
 I'm a csh user for most dialog use, because bash's interactive
 abilites force too much interaction (especially regarding
 completition) in the default configuration. But I'm more and
 more thinking to switch to bash permanently, as soon as I've
 beaten bash's misbehaviour out of its source code. :-)

I didn't/don't know much about bash--other that it seems to be 
everywhere.  Last night I spent several hours using my own hack
that translater the csh aliases to bashrc-type aliases.  Finally
threw in the towel.  

 
 The system's sh uses /etc/profile and .profile in the same
 manner. Then there is bash, which I think uses the following
 files according to man bash, section FILES:
 
   /etc/profile
   The systemwide initialization file,
   executed for login shells
   ~/.bash_profile
   The personal initialization file,
   executed for login shells
   ~/.bashrc
   The individual per-interactive-shell startup file
   ~/.bash_logout
   The individual login shell cleanup file,
   executed when a login shell exits
   ~/.inputrc
   Individual readline initialization file


The last one, .inputrc, is a noop to my brain.  And yes, I just
had my second cup of coffee!  IS there any cheatsheet URL that
'splains the readline init'z'n stuff?

 
 You have to know about the different syntax definition for
 both file types, but it's relatively easy.
 
 setenv ENVNAME envstring  - ENVNAME=envstring; export ENVNAME
   - export ENVNAME=envstring
 
 set VARNAME = 'varstring' - VARNAME=varstring
 
 alias aliname 'alistring' - alias aliname=alistring


Looks at lot like my zsh usage. 



 
 All the config files allow regular sh coding sequences (such
 as the use of conditionals or iterators).
 
 To get a standard prompt in bash, use this:
 
   export PS1=\...@\h:\w\$ 
 
 It is the equivalent to csh's
 
   set promptchars = %#
   set prompt = %...@%m:%~%# 
 
 Note that csh does automatically use % or # according to the
 first setting. I'm not sure how bash handles this.
 

I have always ripped off somebody's prompt and then modified it
to what fits my needs.  Last night I kept running into problems 
with the PATH and the aliases.  Each re-edit I did I figured it
would be just-another-minute before bash worked.  Nope, nada,
zip.  Finally got smart and :quit.

-gary


 
 -- 
 Polytropon
 Magdeburg, Germany
 Happy FreeBSD user since 4.0
 Andra moi ennepe, Mousa, ...

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 7.97a release of Jottings: http://jottings.thought.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


cshrc to bashrc??

2010-12-31 Thread Gary Kline

Anybody know if there is a utility that transforms the /root/.cshrc
into a bash RC file?After decades, I'm giving up on the csh stuff.
Need something simpler.

tia, guys, and hope 2011 is better for all of us!

gary



-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
The 7.97a release of Jottings: http://jottings.thought.org/index.php
   http://journey.thought.org
 ethic 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


.cshrc usage

2010-06-14 Thread Aiza
I want to change the console prompt for all users that get accounts 
created. I added it to /etc/csh.cshrc which says it a system-wide .cshrc 
file. But after adding a new user with pw command with -m and logging in 
as the user name the prompt is still the old way. Do I have to add it to

/usr/share/skel/dot.cshrc to get the change to take effect?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: .cshrc usage

2010-06-14 Thread Polytropon
On Mon, 14 Jun 2010 18:23:52 +0800, Aiza aiz...@comclark.com wrote:
 I want to change the console prompt for all users that get accounts 
 created. I added it to /etc/csh.cshrc which says it a system-wide .cshrc 
 file. But after adding a new user with pw command with -m and logging in 
 as the user name the prompt is still the old way. Do I have to add it to
 /usr/share/skel/dot.cshrc to get the change to take effect?

Check the users' ~/.cshrc to see if they override those settings.
I also have some standard settings for all users in /etc/csh.cshrc,
and users' ~/.cshrc are usually empty (unless they add their own
settings or override mine).

if ($?prompt) then
set promptchars = %#
set prompt = %...@%m:%~%# 
set autolist
#   ... more stuff here ...
endif

This is an example on how to properly implement the standard prompt
(username, hostname, current directory with home substitution, and
permission indicator).

The /usr/share/skel directory contains files that are copied to a
user's directory when an account is created. This means: See what's
in those files. If they override your global settings, change them.
If an account has already been created, check the user's files.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


adding output lines to my .cshrc breaks sftp and scp ...

2010-06-08 Thread Goh Sanda


I added a few lines to the bottom of my standard FreeBSD .cshrc file:

echo 
w
echo 

Just to show me what is going on each time I log in.

The problem is, when I try to scp a file to the system, I get 'w' output echo'd 
to me, and no actual scp.

sftp fails as well - I can no longer log in via sftp, and instead get this 
error:

Received message too long 169882682

I don't understand why .cshrc output is breaking non-interactive SSH file 
transfer.

Is there a way to customize my .cshrc output while still retaining scp/sftp 
functionality ?

Thank you.


  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: adding output lines to my .cshrc breaks sftp and scp ...

2010-06-08 Thread Polytropon
On Tue, 8 Jun 2010 16:41:54 -0700 (PDT), Goh Sanda x4500f...@yahoo.com wrote:
 
 
 I added a few lines to the bottom of my standard FreeBSD .cshrc file:
 
 echo 
 w
 echo 
 
 Just to show me what is going on each time I log in.

Use ~/.login for command that should be executed after you log in.
The corresponding system-wide file is /etc/csh.login.



 I don't understand why .cshrc output is breaking non-interactive
 SSH file transfer.

Because .cshrc is read (and that's why executed) every time a 
shell is requested.



 Is there a way to customize my .cshrc output while still retaining
 scp/sftp functionality ?

Simply use ~/.cshrc for settings, and ~/.login for real commands.



A better explaination can be found in man csh, let me quote:

Startup and shutdown
A  login  shell  begins  by  executing  commands  from the system files
/etc/csh.cshrc and /etc/csh.login.   It  then  executes  commands  from
files  in  the  user's  home  directory:  first  ~/.tcshrc  (+)  or, if
~/.tcshrc is not found, ~/.cshrc, then ~/.history (or the value of  the
histfile shell variable), then ~/.login, and finally ~/.cshdirs (or the
value of  the  dirsfile  shell  variable)  (+).   The  shell  may  read
/etc/csh.login  before  instead  of  after /etc/csh.cshrc, and ~/.login
before instead of after ~/.tcshrc or ~/.cshrc  and  ~/.history,  if  so
compiled; see the version shell variable. (+)

Non-login  shells read only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc on
startup.

For examples of startup  files,  please  consult  http://tcshrc.source-
forge.net.

Commands  like  stty(1)  and  tset(1),  which need be run only once per
login, usually go in one's ~/.login file.  Users who need  to  use  the
same  set  of  files with both csh(1) and tcsh can have only a ~/.cshrc
which checks for the existence of the tcsh shell variable (q.v.) before
using  tcsh-specific  commands,  or  can  have  both  a  ~/.cshrc and a
~/.tcshrc which sources (see the builtin command) ~/.cshrc.   The  rest
of  this manual uses `~/.tcshrc' to mean `~/.tcshrc or, if ~/.tcshrc is
not found, ~/.cshrc'.






-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Adding an alias to .cshrc

2009-12-30 Thread Jerry McAllister
On Tue, Dec 29, 2009 at 07:50:21PM -0500, Steve Bertrand wrote:

 Hi all, happy holidays!
 
 I want to add an alias to my .cshrc file:
 
 alias srm   find . -name *~ | xargs rm
 
Your problem is quoting the command.   It has multiple parts
with white space, so it all needs to be quoted.  Something like:

  alias srm find . -name \*~\ | xargs rm

jerry


 ...so that I have an easy way to remove the temp files left by svn.
 
 After adding the alias, logging out and then back in, I get an error
 stating:
 
 acct-dev: ISP-RADIUS % srm
 srm: Command not found.
 
 I thought that perhaps the file wasn't being read upon login, so I
 appended a new alias underneath:
 
 alias srm   find . -name *~ | xargs rm
 alias sll   ls -lA
 
 ...which works fine when called after re-login.
 
 I even went as far as to prefix the find/xargs command with full paths,
 to no avail.
 
 Is this a problem with the pipe in the alias directive? The command
 works on the CLI, as I literally copy/pasted it into the .cshrc file.
 
 Steve
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Adding an alias to .cshrc

2009-12-30 Thread Jerry McAllister
On Tue, Dec 29, 2009 at 08:07:35PM -0500, Steve Bertrand wrote:

 Glen Barber wrote:
  Hi Steve
  
  On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand st...@ibctech.ca wrote:
  Hi all, happy holidays!
 
  I want to add an alias to my .cshrc file:
 
  alias srm   find . -name *~ | xargs rm
 
  
  Try enclosing it in quotes, such as:
  
 alias srm find . -name \*~\ | xargs rm
 
 This works. Instead of escaping, I just encapsulated within single-quotes:
 
 acct-dev: ISP-RADIUS % grep srm /home/steve/.cshrc
 alias srm   '/usr/bin/find . -name *~ | /usr/bin/xargs rm'

That is OK as long as you are not depending on shell expansion effects.

jerry


 
 Olivier:
 
 I didn't test your theory, but thanks for the tip. I've just become
 accustomed over the years to use xargs when making bulk rm's ;)
 
 Steve
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Adding an alias to .cshrc

2009-12-29 Thread Steve Bertrand
Hi all, happy holidays!

I want to add an alias to my .cshrc file:

alias srm   find . -name *~ | xargs rm

...so that I have an easy way to remove the temp files left by svn.

After adding the alias, logging out and then back in, I get an error
stating:

acct-dev: ISP-RADIUS % srm
srm: Command not found.

I thought that perhaps the file wasn't being read upon login, so I
appended a new alias underneath:

alias srm   find . -name *~ | xargs rm
alias sll   ls -lA

...which works fine when called after re-login.

I even went as far as to prefix the find/xargs command with full paths,
to no avail.

Is this a problem with the pipe in the alias directive? The command
works on the CLI, as I literally copy/pasted it into the .cshrc file.

Steve

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Adding an alias to .cshrc

2009-12-29 Thread Olivier Nicole
Hi,

 Is this a problem with the pipe in the alias directive? The command
 works on the CLI, as I literally copy/pasted it into the .cshrc file.

I would think so.

What about:

alias srm   /usr/bin/find . -name *~ -delete

Best regards,

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Adding an alias to .cshrc

2009-12-29 Thread Glen Barber
Hi Steve

On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand st...@ibctech.ca wrote:
 Hi all, happy holidays!

 I want to add an alias to my .cshrc file:

 alias srm   find . -name *~ | xargs rm


Try enclosing it in quotes, such as:

   alias srm find . -name \*~\ | xargs rm


Regards,

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Adding an alias to .cshrc

2009-12-29 Thread Steve Bertrand
Glen Barber wrote:
 Hi Steve
 
 On Tue, Dec 29, 2009 at 7:50 PM, Steve Bertrand st...@ibctech.ca wrote:
 Hi all, happy holidays!

 I want to add an alias to my .cshrc file:

 alias srm   find . -name *~ | xargs rm

 
 Try enclosing it in quotes, such as:
 
alias srm find . -name \*~\ | xargs rm

This works. Instead of escaping, I just encapsulated within single-quotes:

acct-dev: ISP-RADIUS % grep srm /home/steve/.cshrc
alias srm   '/usr/bin/find . -name *~ | /usr/bin/xargs rm'

Olivier:

I didn't test your theory, but thanks for the tip. I've just become
accustomed over the years to use xargs when making bulk rm's ;)

Steve
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Adding an alias to .cshrc

2009-12-29 Thread George Davidovich
On Tue, Dec 29, 2009 at 07:50:21PM -0500, Steve Bertrand wrote:
 I want to add an alias to my .cshrc file:
 
 alias srm   find . -name *~ | xargs rm

No need for xargs:

  alias srm find . -name '*~' -exec rm {} +

or

  alias srm find . -name '*~' -delete

 ...so that I have an easy way to remove the temp files left by svn.
 
 After adding the alias, logging out and then back in, I get an error
 stating:

Use the builtin(1) 'source' command.  No need to log out/log in.

 acct-dev: ISP-RADIUS % srm
 srm: Command not found.

I'm sure someone more knowledgable about csh (I rely on bash) can help
you debug what exactly happens and why, but quoting your alias command
in .cshrc is all that's required.
 
 I thought that perhaps the file wasn't being read upon login, so I
 appended a new alias underneath:

Easier to check your aliases by typing 'alias', no?

 alias srm   find . -name *~ | xargs rm
 alias sll   ls -lA
 
 ...which works fine when called after re-login.
 
 I even went as far as to prefix the find/xargs command with full paths,
 to no avail.
 
 Is this a problem with the pipe in the alias directive? The command
 works on the CLI, as I literally copy/pasted it into the .cshrc file.

Again, quoting what's being aliased will suffice.  Why that's not
necessary during interactive use, I don't know, but I'd get into the
habit of quoting such things regardless.

-- 
George

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: .cshrc History missing

2009-08-10 Thread Matthew Seaman

Al Plant wrote:

Polytropon wrote:

Allthough I'm not familiar with the particular problem you
described, I observed that the history sometimes (!) does
not survive a reboot. It may have to do with a situation
where more than one shell is running. Idea: The last shell
closed (even forced) saves its history, so the history of
the other shells gets lost.

I've set those globally in /etc/csh.cshrc:

set history = 100
set savehist = 100

Sometimes, history survives, sometimes it doesn't. Very
strange...




Aloha Poly,

I'm glad to have somebody confirm this. I thought it was funny that this 
was happening.


I have earlier CURRENT 8 running on a couple of machines and they never 
acted this way.


This is root that is doing this on my test box.
 set history = 100
 set savehistory = 100
are in the .cshrc file.

I'll look in /etc/csh.cshrc

Thanks...


Yeah.  The history mechanism in tcsh doesn't cope very well with multiple 
ttys being closed down at once, as you tend to find when logging out of an
X session.  You get the history from just one of those shells. 


It's not a complete cure, but telling the shell to merge it's history with
what's already there:

   set history = 500
   set savehist = (1000 merge)

This helps, but it is not completely reliable when several shells are shutdown
in quick succession.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


.cshrc History missing

2009-08-09 Thread Al Plant

Aloha,

I have been trying the new FreeBSD 8 Current, Head and Beta* on an AMD64 
box with 2 CPU's. The OS loads and everything works under all versions 
including i386, but the key stroke history on csh does not survive over 
a reboot or shutdown.


I have never seen this happen before and I have been using FreeBSD for a 
very long time.. since FreeBSD 2.* . Anyone have any ideas what I should 
check for either with hardware or in .cshrc or elsewhere?


Thanks...


~Al Plant - Honolulu, Hawaii -  Phone:  808-284-2740
  + http://hawaiidakine.com + http://freebsdinfo.org +
  + http://aloha50.net   - Supporting - FreeBSD 6.* - 7.* - 8.* +
   email: n...@hdk5.net 
All that's really worth doing is what we do for others.- Lewis Carrol

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: .cshrc History missing

2009-08-09 Thread Polytropon
Allthough I'm not familiar with the particular problem you
described, I observed that the history sometimes (!) does
not survive a reboot. It may have to do with a situation
where more than one shell is running. Idea: The last shell
closed (even forced) saves its history, so the history of
the other shells gets lost.

I've set those globally in /etc/csh.cshrc:

set history = 100
set savehist = 100

Sometimes, history survives, sometimes it doesn't. Very
strange...



-- 
Polytropon
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: .cshrc History missing

2009-08-09 Thread Al Plant

Polytropon wrote:

Allthough I'm not familiar with the particular problem you
described, I observed that the history sometimes (!) does
not survive a reboot. It may have to do with a situation
where more than one shell is running. Idea: The last shell
closed (even forced) saves its history, so the history of
the other shells gets lost.

I've set those globally in /etc/csh.cshrc:

set history = 100
set savehist = 100

Sometimes, history survives, sometimes it doesn't. Very
strange...




Aloha Poly,

I'm glad to have somebody confirm this. I thought it was funny that this 
was happening.


I have earlier CURRENT 8 running on a couple of machines and they never 
acted this way.


This is root that is doing this on my test box.
 set history = 100
 set savehistory = 100
are in the .cshrc file.

I'll look in /etc/csh.cshrc

Thanks...


~Al Plant - Honolulu, Hawaii -  Phone:  808-284-2740
  + http://hawaiidakine.com + http://freebsdinfo.org +
  + http://aloha50.net   - Supporting - FreeBSD 6.* - 7.* - 8.* +
   email: n...@hdk5.net 
All that's really worth doing is what we do for others.- Lewis Carrol

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


why can't I use $1 in .cshrc ?

2008-06-26 Thread Juri Mianovich

I am trying to use this alias in my root .cshrc file:

grep $1 /some/file

but .cshrc _refuses_ to expand $1 as a proper variable (in this case, the first 
argument to the alias...)

I _think_ it's because $1 is being interpreted as a argument to csh _itself_ 
when it runs .cshrc ... but maybe I'm wrong.

Anyway, how to make it work ?

Thanks.


  

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


Re: why can't I use $1 in .cshrc ?

2008-06-26 Thread Derek Ragona

At 07:04 AM 6/26/2008, Juri Mianovich wrote:


I am trying to use this alias in my root .cshrc file:

grep $1 /some/file

but .cshrc _refuses_ to expand $1 as a proper variable (in this case, the 
first argument to the alias...)


I _think_ it's because $1 is being interpreted as a argument to csh 
_itself_ when it runs .cshrc ... but maybe I'm wrong.


Anyway, how to make it work ?

Thanks.



I think you are trying to use an alias where it won't really work.  A 
typical alias is:

la  for ls -a
ll  for ls -lA

It looks like you want to pass an argument and a filename, or at least an 
argument to grep.  Not quite sure if that would work or if it would be much 
use.


The $ is a special character that is interpreted and expanded by the 
shell.  You can use it by escaping it or putting it in quotes, but that 
depends on where it is used (in .cshrc, in a script, etc.)


-Derek

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

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


Re: why can't I use $1 in .cshrc ?

2008-06-26 Thread Pietro Cerutti

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Juri Mianovich wrote:
| I am trying to use this alias in my root .cshrc file:
|
| grep $1 /some/file
|
| but .cshrc _refuses_ to expand $1 as a proper variable (in this case,
the first argument to the alias...)
|
| I _think_ it's because $1 is being interpreted as a argument to csh
_itself_ when it runs .cshrc ... but maybe I'm wrong.
|
| Anyway, how to make it work ?


Try with \!\!:1

Example:

alias say   echo 'I say \!\!:1'

| say hello
I say hello

|
| Thanks.

You're welcome.

- --
Pietro Cerutti
[EMAIL PROTECTED]

PGP Public Key:
http://gahr.ch/pgp

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)

iEYEAREKAAYFAkhjqFkACgkQwMJqmJVx944z4QCeKf5wirL9TOqAy0QhyUt7f0mE
/2AAoJB1nkUYSfd4/QEdmJUEENaUsA12
=zK3x
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: why can't I use $1 in .cshrc ?

2008-06-26 Thread N. Raghavendra
At 2008-06-26T05:04:52-07:00, Juri Mianovich wrote:

 I am trying to use this alias in my root .cshrc file:

 grep $1 /some/file

 but .cshrc _refuses_ to expand $1 as a proper variable (in this
 case, the first argument to the alias...)

 I _think_ it's because $1 is being interpreted as a argument to csh
 _itself_ when it runs .cshrc ... but maybe I'm wrong.

 Anyway, how to make it work ?

See the tcsh(1) section `Alias substitution':

  If the alias contains a history reference, it undergoes History
  substitution (q.v.) as though the original command were the previous
  input line.

[riemann:/home/raghu]% alias foo grep \!^ /etc/passwd
[riemann:/home/raghu]% foo toor
toor:*:0:0:Bourne-again Superuser:/root:

[riemann:/home/raghu]% alias bar grep \!:1 \!:2
[riemann:/home/raghu]% bar '^man' /etc/passwd
man:*:9:9:Mister Man Pages:/usr/share/man:/usr/sbin/nologin

HTH,
Raghavendra.

-- 
N. Raghavendra [EMAIL PROTECTED] | http://www.retrotexts.net/
Harish-Chandra Research Institute   | http://www.mri.ernet.in/
See message headers for contact and OpenPGP information.

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


Re: setting an alias in .cshrc with parentheses in it ...

2005-04-08 Thread Volodymyr Kostyrko
Joe Schmoe wrote:
I often run this command:
lynx -useragent blah blah (compatible; MSIE blah
blah)
Note that the custom referrer string that I set
includes parentheses.
So, to save time, I added this line to my .cshrc:
alias lynx lynx -useragent blah blah (compatible;
MSIE blah blah)
However, when I run lynx, I get this error:
Badly placed ()'s
If I escape the parentheses with a backslash in
..cshrc, it also doesn't work - it splits the line up
and lynx thinks that the next command line argument
begins where the first backslash is inserted.
So how do I include a command alias that contains
parentheses into .cshrc ?
thanks.
alias lynx 'lynx -useragent blah blah (compatible; MSIE blah blah)'
--
[WBR], Arcade. [SAT Astronomy/Think to survive!]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


setting an alias in .cshrc with parentheses in it ...

2005-04-07 Thread Joe Schmoe
Hello,

I often run this command:

lynx -useragent blah blah (compatible; MSIE blah
blah)

Note that the custom referrer string that I set
includes parentheses.

So, to save time, I added this line to my .cshrc:

alias lynx lynx -useragent blah blah (compatible;
MSIE blah blah)

However, when I run lynx, I get this error:

Badly placed ()'s

If I escape the parentheses with a backslash in
.cshrc, it also doesn't work - it splits the line up
and lynx thinks that the next command line argument
begins where the first backslash is inserted.

So how do I include a command alias that contains
parentheses into .cshrc ?

thanks.



__ 
Do you Yahoo!? 
Yahoo! Personals - Better first dates. More second dates. 
http://personals.yahoo.com

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


Re: .cshrc

2005-03-26 Thread Gert Cuykens
I dont have colors :(
How do you turn off the tab beep ?

# $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
# 
# .cshrc - csh resource script, read at beginning of execution by each shell
# 
# see also csh(1), environ(7).
#

alias h history 25
alias j jobs -l
alias lals -a 
alias lfls -FA
alias llls -lA

# A righteous umask
umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
/usr/local/bin /usr/X11R6/bin $HOME/bin)

setenv  EDITOR  joe 
setenv  PAGER   more
setenv  BLOCKSIZE   K
setenv  CLICOLOR_FORCE  1

if ($?prompt) then
# An interactive shell -- set some stuff up
# set prompt = `/bin/hostname -s`# 
set prompt = [EMAIL PROTECTED]:%b%~%# 
set autolist = ambigous
set filec
set history = 100 
set savehist = 100
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey ^W backward-delete-word
bindkey -k up history-search-backward 
bindkey -k down history-search-forward
endif
endif
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-26 Thread Jerry McAllister
 
 Is .profile read by every shell ?

No.   .profile is read up by the sh shell and its derivatives.

When the csh shell and its derivatives such as tcsh starts, 
its reads up .cshrc.The effect is somewhat the same, but it uses
the syntax is for csh. The syntax for .profile is for sh.

The csh shell of more likely not, tcsh, is more friendly for
interacticve use than the sh shell.Those who like the sh type
syntax nowdays use the derivative bash as their shell.  It is also 
more interactive friendly than plain sh.

jerry

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

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


Re: .cshrc

2005-03-26 Thread cpghost
On Sat, Mar 26, 2005 at 10:12:26AM -0500, Jerry McAllister wrote:
 The csh shell of more likely not, tcsh, is more friendly for
 interacticve use than the sh shell.Those who like the sh type
 syntax nowdays use the derivative bash as their shell.  It is also 
 more interactive friendly than plain sh.

BTW, why doesn't sh include readline(3) or some other kind of
command line editing capability? The only reason for using bash
over sh is for many people the lack of a decent command line editor
function in sh. Footprint perhaps?

 jerry

Cheers,
-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-26 Thread Giorgos Keramidas
On 2005-03-26 16:20, [EMAIL PROTECTED] wrote:
On Sat, Mar 26, 2005 at 10:12:26AM -0500, Jerry McAllister wrote:
 The csh shell of more likely not, tcsh, is more friendly for
 interacticve use than the sh shell.  Those who like the sh type
 syntax nowdays use the derivative bash as their shell.  It is also
 more interactive friendly than plain sh.

 BTW, why doesn't sh include readline(3) or some other kind of command
 line editing capability? The only reason for using bash over sh is for
 many people the lack of a decent command line editor function in
 sh. Footprint perhaps?

It does.  You can enable either emacs-style line editing with:

$ set -o emacs

or vi-style command line editing with:

$ set -o vi

Note though that tab completion is not supported for commands or
filenames, AFAIK, so you may still want to stick with bash.

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


Re: .cshrc

2005-03-26 Thread Gert Cuykens
On Sat, 26 Mar 2005 13:59:18 +0100, Gert Cuykens [EMAIL PROTECTED] wrote:
 I dont have colors :(
 How do you turn off the tab beep ?
 
 # $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
 #
 # .cshrc - csh resource script, read at beginning of execution by each shell
 #
 # see also csh(1), environ(7).
 #
 
 alias h history 25
 alias j jobs -l
 alias lals -a
 alias lfls -FA
 alias llls -lA
 
 # A righteous umask
 umask 22
 
 set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
 /usr/local/bin /usr/X11R6/bin $HOME/bin)
 
 setenv  EDITOR  joe
 setenv  PAGER   more
 setenv  BLOCKSIZE   K
 setenv  CLICOLOR_FORCE  1
 
 if ($?prompt) then
 # An interactive shell -- set some stuff up
 # set prompt = `/bin/hostname -s`# 
 set prompt = [EMAIL PROTECTED]:%b%~%# 
 set autolist = ambigous
 set filec
 set history = 100
 set savehist = 100
 set mail = (/var/mail/$USER)
 if ( $?tcsh ) then
 bindkey ^W backward-delete-word
 bindkey -k up history-search-backward
 bindkey -k down history-search-forward
 endif
 endif
 

I did CLICOLOR true and now i have colors :)

Still making beep noises doh how do you turn them of ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-26 Thread exp
On Sun, Mar 27, 2005 at 01:19:17AM +0100, Gert Cuykens wrote:
 On Sat, 26 Mar 2005 13:59:18 +0100, Gert Cuykens [EMAIL PROTECTED] wrote:
  I dont have colors :(
  How do you turn off the tab beep ?
  
  # $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
  #
  # .cshrc - csh resource script, read at beginning of execution by each shell
  #
  # see also csh(1), environ(7).
  #
  
  alias h history 25
  alias j jobs -l
  alias lals -a
  alias lfls -FA
  alias llls -lA
  
  # A righteous umask
  umask 22
  
  set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
  /usr/local/bin /usr/X11R6/bin $HOME/bin)
  
  setenv  EDITOR  joe
  setenv  PAGER   more
  setenv  BLOCKSIZE   K
  setenv  CLICOLOR_FORCE  1
  
  if ($?prompt) then
  # An interactive shell -- set some stuff up
  # set prompt = `/bin/hostname -s`# 
  set prompt = [EMAIL PROTECTED]:%b%~%# 
  set autolist = ambigous
  set filec
  set history = 100
  set savehist = 100
  set mail = (/var/mail/$USER)
  if ( $?tcsh ) then
  bindkey ^W backward-delete-word
  bindkey -k up history-search-backward
  bindkey -k down history-search-forward
  endif
  endif
  
 
 I did CLICOLOR true and now i have colors :)
 
 Still making beep noises doh how do you turn them of ?
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

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


.cshrc

2005-03-25 Thread Gert Cuykens
This is the shell config file right ?
I created a new user and put a .cshrc in his home directory but
nothing happens ?

FX-53# pw user show gert
gert:*:1001:0::0:0:gert:/usr/home/gert:/bin/sh

FX-53# pwd
/usr/home/gert

FX-53# ls -all
total 609272
drwxr-xr-x  3 gert  wheel512 Mar 26 00:18 .
drwxr-xr--  3 root  wheel512 Mar 19 22:44 ..
-rw-r--r--  1 gert  wheel802 Mar 25 13:12 .cshrc
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Christopher Nehren
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2005-03-25, Gert Cuykens scribbled these
curious markings:
 This is the shell config file right ?
 I created a new user and put a .cshrc in his home directory but
 nothing happens ?

 FX-53# pw user show gert
 gert:*:1001:0::0:0:gert:/usr/home/gert:/bin/sh
 ^^^
The user isn't using csh, so thus their shell won't read (and probably
isn't able to read) the .cshrc file which you've specified.

Best Regards,
Christopher Nehren
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCRKHuk/lo7zvzJioRArGAAJkBFLEM2T2UiAQx6edfuXqJZbvg6gCgqczc
s0TKZAKc5WfuTfd6TyIgOVM=
=9A5o
-END PGP SIGNATURE-

-- 
I abhor a system designed for the user, if that word is a coded
pejorative meaning stupid and unsophisticated. -- Ken Thompson
If you ask the wrong questions, you get answers like 42 and God.
Unix is user friendly. However, it isn't idiot friendly.

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


Re: .cshrc

2005-03-25 Thread Erik Trulsson
On Sat, Mar 26, 2005 at 12:32:59AM +0100, Gert Cuykens wrote:
 This is the shell config file right ?

.cshrc is *a* shell config file.  To be more precise it is the file
that csh/tcsh (usually) reads in when started. (For details on exactly
what files is read at startup by this shell read the csh(1) manpage.)

Other shells read other files. (sh looks at .profile, zsh uses
zshenv/zlogin/zshrc, etc.)  Read the manpage for each shell to find out
all the messy details.


 I created a new user and put a .cshrc in his home directory but
 nothing happens ?

Why should anything happen?  What did you expect to happen?


 
 FX-53# pw user show gert
 gert:*:1001:0::0:0:gert:/usr/home/gert:/bin/sh
 
 FX-53# pwd
 /usr/home/gert
 
 FX-53# ls -all
 total 609272
 drwxr-xr-x  3 gert  wheel512 Mar 26 00:18 .
 drwxr-xr--  3 root  wheel512 Mar 19 22:44 ..
 -rw-r--r--  1 gert  wheel802 Mar 25 13:12 .cshrc
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]

-- 
Insert your favourite quote here.
Erik Trulsson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Gert Cuykens
  I created a new user and put a .cshrc in his home directory but
  nothing happens ?
 
 Why should anything happen?  What did you expect to happen?

This :)

FX-53# cat .cshrc
# $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#

alias h history 25
alias j jobs -l
alias lals -a
alias lfls -FA
alias llls -lA

# A righteous umask
umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
/usr/local/bin /usr/X11R6/bin $HOME/bin)

setenv  EDITOR  joe
setenv  PAGER   more
setenv  BLOCKSIZE   K

if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = `/bin/hostname -s`# 
set filec
set history = 100
set savehist = 100
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey ^W backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
endif
endif
FX-53# 

So the question is why does root uses csh shell and the a user a sh
shell. What brings me to the following question , What is the best
shell to use :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Chris
Gert Cuykens wrote:
I created a new user and put a .cshrc in his home directory but
nothing happens ?

Why should anything happen?  What did you expect to happen?
 
 
 This :)
 
 FX-53# cat .cshrc
 # $FreeBSD: src/etc/root/dot.cshrc,v 1.29 2004/04/01 19:28:00 krion Exp $
 #
 # .cshrc - csh resource script, read at beginning of execution by each shell
 #
 # see also csh(1), environ(7).
 #
 
 alias h history 25
 alias j jobs -l
 alias lals -a
 alias lfls -FA
 alias llls -lA
 
 # A righteous umask
 umask 22
 
 set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
 /usr/local/bin /usr/X11R6/bin $HOME/bin)
 
 setenv  EDITOR  joe
 setenv  PAGER   more
 setenv  BLOCKSIZE   K
 
 if ($?prompt) then
 # An interactive shell -- set some stuff up
 set prompt = `/bin/hostname -s`# 
 set filec
 set history = 100
 set savehist = 100
 set mail = (/var/mail/$USER)
 if ( $?tcsh ) then
 bindkey ^W backward-delete-word
 bindkey -k up history-search-backward
 bindkey -k down history-search-forward
 endif
 endif
 FX-53# 
 
 So the question is why does root uses csh shell and the a user a sh
 shell. What brings me to the following question , What is the best
 shell to use :)


Useing vipw (as root) change the users shell from:

/bin/sh
- to -
/bin/csh

That's all

-- 
Best regards,
Chris

Performance is directly affected by the perversity of
inanimate objects.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Erik Trulsson
On Sat, Mar 26, 2005 at 12:55:17AM +0100, Gert Cuykens wrote:
   I created a new user and put a .cshrc in his home directory but
   nothing happens ?
  
  Why should anything happen?  What did you expect to happen?
 
 This :)
 
 FX-53# cat .cshrc

[snip]

That was not decription of anything happening. It was just the contents
of a file.  If you meant that you expected that file to be read when
you started a shell, and that you did start such a shell, then you
should say so.



 
 So the question is why does root uses csh shell and the a user a sh
 shell.

Historical reasons mainly.

 What brings me to the following question , What is the best
 shell to use :)

Whichever one you prefer is obviously the best one for you.
Personally I prefer zsh.  Other people have other preferences.


-- 
Insert your favourite quote here.
Erik Trulsson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Gert Cuykens
On Sat, 26 Mar 2005 01:23:11 +0100, Erik Trulsson
[EMAIL PROTECTED] wrote:
 On Sat, Mar 26, 2005 at 12:55:17AM +0100, Gert Cuykens wrote:
I created a new user and put a .cshrc in his home directory but
nothing happens ?
  
   Why should anything happen?  What did you expect to happen?
 
  This :)
 
  FX-53# cat .cshrc
 
 [snip]
 
 That was not decription of anything happening. It was just the contents
 of a file.  If you meant that you expected that file to be read when
 you started a shell, and that you did start such a shell, then you
 should say so.
 
 
 
  So the question is why does root uses csh shell and the a user a sh
  shell.
 
 Historical reasons mainly.
 
  What brings me to the following question , What is the best
  shell to use :)
 
 Whichever one you prefer is obviously the best one for you.
 Personally I prefer zsh.  Other people have other preferences.
 

Whats the difference between csh ans sh ?
Why do you like zsh ?

Cant be that much difference right ? PS wich shell gives you a command
over view when you double tab like on a linux box ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Gert Cuykens
Is .profile read by every shell ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Gert Cuykens
Is .profile read by every shell ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Christopher Nehren
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2005-03-26, Gert Cuykens scribbled these
curious markings:
 Is .profile read by every shell ?

No. If it was, users who disdain Bourne shells (like sh, ksh, zsh, and
the ever-popular bash) for whatever reason (and the reasons are myriad,
IMO) wouldn't be able to log in. This was alluded to in my post wherein
I mentioned that sh probably wouldn't be able to read the .cshrc file
(depending upon what you've placed in it).

Best Regards,
Christopher Nehren
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCRLM/k/lo7zvzJioRAk+cAKCUNn8Qj4vRQO5v7FD1LRm2gc1tswCfWHRG
qfTAothpPrSG3q+69KQDG9M=
=C3AA
-END PGP SIGNATURE-

-- 
I abhor a system designed for the user, if that word is a coded
pejorative meaning stupid and unsophisticated. -- Ken Thompson
If you ask the wrong questions, you get answers like 42 and God.
Unix is user friendly. However, it isn't idiot friendly.

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


Re: .cshrc

2005-03-25 Thread Abu Khaled
On Sat, 26 Mar 2005 01:47:13 +0100, Gert Cuykens [EMAIL PROTECTED] wrote:
 Is .profile read by every shell ?
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

AFAIK only sh reads .profile

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


Re: .cshrc

2005-03-25 Thread Gert Cuykens
On Sat, 26 Mar 2005 00:53:45 + (UTC), Christopher Nehren
[EMAIL PROTECTED] wrote:
  Is .profile read by every shell ?
 
 No. If it was, users who disdain Bourne shells (like sh, ksh, zsh, and
 the ever-popular bash) for whatever reason (and the reasons are myriad,
 IMO) wouldn't be able to log in. This was alluded to in my post wherein
 I mentioned that sh probably wouldn't be able to read the .cshrc file
 (depending upon what you've placed in it).


I would like one with allot of colors and a double tab completion that
shows every command or file :)

Is bash the only one that does that or can csh do that too ?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread Kevin Kinsey
Gert Cuykens wrote:
Is .profile read by every shell ?
 

It's for the Bourne type shells (sh, and bash), but I'm
not into those, so I'm not sure if bash cares about .profile
or not, or if there's a way to tell it that it should read that.
IIRC, there's a .bashrc for bash, just as there is, IIRC, a
.shrc for sh, the original Bourne shell.  (You do know that
bash is an acronym for Bourne Again SHell, right?  A
play on the English translation of Jesus' words to Nicodemus
in John III:iii: Except a man be born again ... which was
probably particularly funny in America in the late 1970s...)
.cshrc is read by csh/tcsh, which, incidentally enough,
are the same thing on FreeBSD unless for some reason
diff(1) is idiotic in this regard:
[604] Fri 25.Mar.2005 19:48:40
[EMAIL PROTECTED]/home/shared]
# diff /bin/csh /bin/tcsh
--- and I suppose that's why there's no .tcshrc AFAIK
on FBSD.
HTH,
Kevin Kinsey
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: .cshrc

2005-03-25 Thread FreeBSD questions mailing list
I would like one with allot of colors and a double tab completion that
shows every command or file :)
Is bash the only one that does that or can csh do that too ?
Hey Gert,
I use tcsh and have these variables in my .cshrc:
setenv  CLICOLOR_FORCE 1
set prompt = '[EMAIL PROTECTED]:%b%~%# '
set autolist = ambigous
It hasn't got a lot of colours but enough to distingiush the files from 
folders etc...
And autocompletion and hints.
Arno

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

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


Re: .cshrc

2005-03-25 Thread Christopher Nehren
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2005-03-26, Gert Cuykens scribbled these
curious markings:
 I would like one with allot of colors and a double tab completion that
 shows every command or file :)

Uhm, colours where? And why follow Bash's silly example of requiring two
tabs when you can use one? And why use tab completion which requires two
tabs and which beeps at you for no reason instead of using ^D completion
which only requires one instance of ^D and which doesn't beep at you?

 Is bash the only one that does that or can csh do that too ?

No, csh can do this too, despite what seem to be misconceptions about
csh still being in the dark ages.

Best Regards,
Christopher Nehren
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCRMXHk/lo7zvzJioRAl5OAJ423MK2MbD4qD1pDjsIEYVm+yhowgCgqRVM
OteBGH37ETBUybOSsIZmR0M=
=Xn6w
-END PGP SIGNATURE-

-- 
I abhor a system designed for the user, if that word is a coded
pejorative meaning stupid and unsophisticated. -- Ken Thompson
If you ask the wrong questions, you get answers like 42 and God.
Unix is user friendly. However, it isn't idiot friendly.

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


Re: .cshrc

2005-03-25 Thread Christopher Nehren
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2005-03-26, Kevin Kinsey scribbled these
curious markings:
 --- and I suppose that's why there's no .tcshrc AFAIK
 on FBSD.

There's no .tcshrc file, but if you read the manual for csh you'll see
that there are semantics for processing both files, and that they are
not equivalent.

Users who have used Net|OpenBSD will know that having separate files is
useful, because those systems ship with 4.4BSD csh and have TENEX csh
(the one that's in FreeBSD) in the ports tree. 4.4BSD csh doesn't read
the .tcshrc file, which is good if you want to put TENEX csh commands in
a file without either using ugly if() statements or breaking csh.

Best Regards,
Christopher Nehren
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCRMaHk/lo7zvzJioRAqM5AJ4gprZe9EtPZsszSalpkuDCNEF26QCePS8t
d6/s4xWcfJssagbTKuu8MZc=
=Fyd1
-END PGP SIGNATURE-

-- 
I abhor a system designed for the user, if that word is a coded
pejorative meaning stupid and unsophisticated. -- Ken Thompson
If you ask the wrong questions, you get answers like 42 and God.
Unix is user friendly. However, it isn't idiot friendly.

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


/.cshrc and /.profile

2004-02-12 Thread h0444lp6
Dear list

What are the /.cshrc and /.profile files for?

Since /etc holds the system wide conf files and ~ the user specific ones
I do not understand why there are the ones in /.

TIA


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


Re: /.cshrc and /.profile

2004-02-12 Thread Jonathan Chen
On Fri, Feb 13, 2004 at 12:56:01AM +0800, h0444lp6 wrote:
 Dear list
 
 What are the /.cshrc and /.profile files for?
 
 Since /etc holds the system wide conf files and ~ the user specific ones
 I do not understand why there are the ones in /.

When the machine boots into single-user mode, the root user's HOME is
set to /.
-- 
Jonathan Chen [EMAIL PROTECTED]
--
  Build a man a fire, and he'll be warm for a day.
Set a man on fire, and he'll be warm for the rest of his life.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


convert .cshrc to .bashrc

2004-01-30 Thread Didier Wiroth
Hi,

I'm almost new to freebsd about a few month now. It took me some while to learn how to 
customize my .cshrc file. I would like to switch to bash2 now. 

1) I was wondering if there is a tool (from the ports collection) that can 
automatically convert my customized .cshrc to a .bashrc compatibel file (converting 
aliases, path stuff, prompt etc). 

2) Is there a skeleton (dot.bashrc) file somewhere I can download somewhere for bash, 
like the dot.cshrc.

Many thanks


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


Re: convert .cshrc to .bashrc

2004-01-30 Thread Robert Barten
On Sat, Jan 31, 2004 at 12:11:54AM +0100, Colin J. Raven wrote:
 Just google sample .bashrc that should yield something you can begin
 with. The two aren't *that* different y'know, so don't get stressed
 about it.
   
 + 2) Is there a skeleton (dot.bashrc) file somewhere I can 
 + download somewhere for bash, like the dot.cshrc.
 
 As said above, Google is most assuredly your best friend in this
 instance.

or

/usr/ports/shells/bash2/work/bash-2.05b/examples/startup-files

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


Re: convert .cshrc to .bashrc

2004-01-30 Thread Daniela
On Friday 30 January 2004 23:32, Robert Barten wrote:
 On Sat, Jan 31, 2004 at 12:11:54AM +0100, Colin J. Raven wrote:
  Just google sample .bashrc that should yield something you can begin
  with. The two aren't *that* different y'know, so don't get stressed
  about it.
 
  + 2) Is there a skeleton (dot.bashrc) file somewhere I can
  + download somewhere for bash, like the dot.cshrc.
 
  As said above, Google is most assuredly your best friend in this
  instance.

 or

 /usr/ports/shells/bash2/work/bash-2.05b/examples/startup-files

I think www.dotfiles.org has some.


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


RE: convert .cshrc to .bashrc

2004-01-30 Thread Colin J. Raven

 
+ On Friday 30 January 2004 23:32, Robert Barten wrote:
+  On Sat, Jan 31, 2004 at 12:11:54AM +0100, Colin J. Raven wrote:
+   Just google sample .bashrc that should yield something 
+ you can begin
+   with. The two aren't *that* different y'know, so don't 
+ get stressed
+   about it.
+  
+   + 2) Is there a skeleton (dot.bashrc) file somewhere I can
+   + download somewhere for bash, like the dot.cshrc.
+  
+   As said above, Google is most assuredly your best friend in this
+   instance.
+ 
+  or
+ 
+  /usr/ports/shells/bash2/work/bash-2.05b/examples/startup-files

This is good stuff!! I had absolutely *no* knowledge that these
existed
Reading 'em now, with great interest - thanks much Mr. Barten

+ I think www.dotfiles.org has some.

Ummm Daniela, mumble Perhaps you are referring to:

http://www.dotfiles.com/index.php3?cat_id=6

Which was an excellent suggestion BTW!

Please excuse me, my exoskeleton requires steam cleaning, so I must
leave.


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


How to tweak the contents of the initial .cshrc file

2002-07-18 Thread Raja Velu


Hi All,

I am looking to customize the post-install process of a custom FreeBSD 4.6
server. I would like to install some custom packages when a root user logs
in to the system for the first time after a fresh install.

If I knew where in the install CD1, the actual creation of root's .cshrc
takes place, I thought I could add some custom script to that and take care
of my post-install configuration process. If that sounds like too
round-about a way to achieve what I want, please suggest alternatives.

Thanks.

Raja


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: How to tweak the contents of the initial .cshrc file

2002-07-18 Thread Adam Weinberger

check out /usr/share/skel/dot.cshrc

-Adam


 (07.18.2002 @ 1338 PST): Raja Velu said, in 0.6K: 
 
 Hi All,
 
 I am looking to customize the post-install process of a custom FreeBSD 4.6
 server. I would like to install some custom packages when a root user logs
 in to the system for the first time after a fresh install.
 
 If I knew where in the install CD1, the actual creation of root's .cshrc
 takes place, I thought I could add some custom script to that and take care
 of my post-install configuration process. If that sounds like too
 round-about a way to achieve what I want, please suggest alternatives.
 
 Thanks.
 
 Raja
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-questions in the body of the message
 
 end of How to tweak the contents of the initial .cshrc file from Raja Velu 


--
Oh good, my dog found the chainsaw.
-Lilo, Lilo  Stitch
Adam Weinberger
[EMAIL PROTECTED]
http://vectors.cx


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message