[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Here documents and CRLF



Hi!

I have made the following test with my stone-old Toswin (the hash `#' and
the greater sign `>' are my shell prompts):

# UNIXMODE=/brUs
# export UNIXMODE
# cat >junk <<EOF
> foo
> bar
> baz
EOF
# vi junk

In the vi it turns out that despite of the `b' in UNIXMODE the file junk
contains carriage returns:

foo^M
bar^M
baz^M

If I repeat the same test from a console login (not with Toswin or AES)
things work, i. e. no CRLF in the output file.

Looks like my Toswin doesn't initialize the terminal mode correctly. Can
you reproduce that strange behavior with a more recent version of Toswin
than mine? If so, Christian should try to fix that in Toswin.

Ciao

Guido

P.S.: I don't think it matters, but my shell was in both cases /bin/bash.

P.P.S: Nope, it's even stranger, just tested. I'm again in my Toswin, and
I start bash but not as a login shell.  I am superuser now.  I do the test
and no CRLF junk in the output file.  I then do a "login guido", my login
shell bash starts and I repeat the test: CRLF in the file.  I logout via
"exit", back to normal bash as superuser: The test succeeds, no probs this
time.

My /etc/profile looks like:

PATH=...
export PATH
umask 022
TMP=${TMP='/tmp'}
TEMP=$TMP
TMPDIR=$TMP
LESSCHARSET=latin1
LC_CTYPE=iso8859_1
export LESSCHARSET LC_CTYPE

# Include site-specific settings.
for script in /etc/profile.d/*.sh; do
  . $script
done
# end of /etc/profile.

In /etc/profile.d currently two scripts reside. One expands my MANPATH the
other is "unixmode.sh":

#! /bin/sh
UNIXMODE=/brUs; export UNIXMODE

Hm, I should move that into /etc/profile so that the following script are
guaranteed to have a proper setting for UNIXMODE.

Anyways, with a console login things work, with a login shell started from
a shell started from Toswin, things don't work. Any idea? 

Somehow the terminal mode is not evaluated correctly by my Toswin's tw52
terminal emulation.  So what about the new tw100?  What if you emulate
tw52 in Toswin2?
-- 
http://stud.uni-sb.de/~gufl0000
mailto:gufl0000@stud.uni-sb.de