[916] in athena10

home help back first fref pref prev next nref lref last post

tcsh silently ignores the end of a script with no trailing newline

daemon@ATHENA.MIT.EDU (Anders Kaseorg)
Thu Jan 22 19:34:53 2009

Date: Thu, 22 Jan 2009 19:33:42 -0500 (EST)
From: Anders Kaseorg <andersk@MIT.EDU>
To: tcsh-bugs@mx.gw.com
cc: debathena@mit.edu
Message-ID: <alpine.DEB.2.00.0901221924230.11108@vinegar-pot.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

balanced-tree:/tmp> printf 'echo hi\n' > file1
balanced-tree:/tmp> printf 'echo hi' > file2
balanced-tree:/tmp> tcsh file1
hi
balanced-tree:/tmp> tcsh file2

This has caused confusion for users on a system with tcsh as the default 
shell, when they attempt to edit their dotfiles using editors that do not 
add a trailing newline by default.

Anders

home help back first fref pref prev next nref lref last post