Re: length in gawk returns wrong value

2012-07-20 Thread Reini Urban
On Thu, Jul 19, 2012 at 12:02 PM, Eric Blake wrote: > On 07/19/2012 10:53 AM, Aaron Schneider wrote: >> I can't find such csh or cshell on my system, I've searched from >> packages and I only see scsh, slsh, posh, mosh, tcsh, zsh, mksh that I > > Both scsh and tcsh are from the csh family of shell

Re: length in gawk returns wrong value

2012-07-19 Thread Aaron Schneider
On 19/07/2012 19:02, Eric Blake wrote: Why bother? csh syntax is non-standard, and in my opinion, it is ugly (others around here disagree, or tcsh would have died long ago, but that's a different story - it's mostly people that were on a system that picked csh as its default shell long before s

Re: length in gawk returns wrong value

2012-07-19 Thread Cliff Hones
On 19/07/2012 17:53, Aaron Schneider wrote: > I can't find such csh or cshell on my system, I've searched from packages and > I only see scsh, slsh, posh, mosh, tcsh, zsh, mksh that I don't have > installed in my system any of them, unless csh comes with the system. How do > I run the csh? tcs

Re: length in gawk returns wrong value

2012-07-19 Thread Eric Blake
On 07/19/2012 10:53 AM, Aaron Schneider wrote: >> I think you'll find the clue is the ".csh" extension. That syntax is >> for the C-shell, not bash. >> >> -- Cliff >> > > I can't find such csh or cshell on my system, I've searched from > packages and I only see scsh, slsh, posh, mosh, tcsh, zsh,

Re: length in gawk returns wrong value

2012-07-19 Thread Aaron Schneider
On 19/07/2012 18:44, Cliff Hones wrote: On 19/07/2012 17:16, Aaron Schneider wrote: Looking at /etc/profile.d/lang.csh if ( $?LC_ALL == 0 && $?LC_CTYPE == 0 && $?LANG == 0 ) setenv LANG `/usr/bin/locale -uU` I wonder why in my system the setenv command does not exist: $ setenv -bash: set

Re: length in gawk returns wrong value

2012-07-19 Thread Cliff Hones
On 19/07/2012 17:16, Aaron Schneider wrote: > Looking at /etc/profile.d/lang.csh > if ( $?LC_ALL == 0 && $?LC_CTYPE == 0 && $?LANG == 0 ) setenv LANG > `/usr/bin/locale -uU` > > I wonder why in my system the setenv command does not exist: > $ setenv > -bash: setenv: command not found > > an

Re: length in gawk returns wrong value

2012-07-19 Thread Aaron Schneider
On 19/07/2012 16:55, Corinna Vinschen wrote: On Jul 19 15:58, Aaron Schneider wrote: On 19/07/2012 14:35, Csaba Raduly wrote: Proving, once again, that "There Ain't No Such Thing as Plain Text" http://www.joelonsoftware.com/articles/Unicode.html Csaba No idea, but can't cygwin come with n

Re: length in gawk returns wrong value

2012-07-19 Thread Corinna Vinschen
On Jul 19 15:58, Aaron Schneider wrote: > On 19/07/2012 14:35, Csaba Raduly wrote: > > > >Proving, once again, that "There Ain't No Such Thing as Plain Text" > >http://www.joelonsoftware.com/articles/Unicode.html > > > > > >Csaba > > > > No idea, but can't cygwin come with native UTF-8 enabled by

Re: length in gawk returns wrong value

2012-07-19 Thread Aaron Schneider
On 19/07/2012 14:35, Csaba Raduly wrote: Proving, once again, that "There Ain't No Such Thing as Plain Text" http://www.joelonsoftware.com/articles/Unicode.html Csaba No idea, but can't cygwin come with native UTF-8 enabled by default so the behavior is the same for everyone? -- Problem

Re: length in gawk returns wrong value

2012-07-19 Thread Csaba Raduly
On Thu, Jul 19, 2012 at 1:39 PM, Corinna Vinschen wrote: > On Jul 19 11:27, Ralf wrote: >> Corinna Vinschen cygwin.com> writes: >> >> > >> > Uh oh. 1.7.9 is old. Please update. >> > >> > > 000 R 374 c k e n \r \n >> > > 010 >> > > Length: 1 >> > > >> > > What can I do to get

Re: length in gawk returns wrong value

2012-07-19 Thread Corinna Vinschen
On Jul 19 11:27, Ralf wrote: > Corinna Vinschen cygwin.com> writes: > > > > > Uh oh. 1.7.9 is old. Please update. > > > > > 000 R 374 c k e n \r \n > > > 010 > > > Length: 1 > > > > > > What can I do to get the correct length in gawk without changing > > > ttt.txt? > > >

Re: length in gawk returns wrong value

2012-07-19 Thread Ralf
Corinna Vinschen cygwin.com> writes: > > Uh oh. 1.7.9 is old. Please update. > > > 000 R 374 c k e n \r \n > > 010 > > Length: 1 > > > > What can I do to get the correct length in gawk without changing > > ttt.txt? > > Dunno. This is not what I see. What did you have $

Re: length in gawk returns wrong value

2012-07-19 Thread Corinna Vinschen
On Jul 19 08:50, Ralf wrote: > The following lines create a file named ttt.txt. The file ttt.txt contains > exactly what I want (oct 374 for the umlaut u). But if you look at the output > of > these lines you can see that the function length() of gawk can not handle this > character: > > uname -a

length in gawk returns wrong value

2012-07-19 Thread Ralf
The following lines create a file named ttt.txt. The file ttt.txt contains exactly what I want (oct 374 for the umlaut u). But if you look at the output of these lines you can see that the function length() of gawk can not handle this character: uname -a echo "Rücken" > ttt.txt od -c ttt.txt gawk