Irek,
When I test printf "foo" >bar there is no newline in the file:
$ printf "foo" >bar
$ od -bc bar
0000000 146 157 157
f o o
0000003
So if head -1 is suppose to print the first line, there is no end of line,
hence to no line. Given the definition of head prints lines, wouldn't a file
containing no newline chars, not have any output from head?
Jeff Fellin
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Irek Szczesniak
Sent: Thursday, September 19, 2013 14:38
To: ast-users; [email protected]
Subject: [ast-users] 'printf "foo" >bar; head -1 bar' - ksh93 builtin vs OSX
portability?
The question below came up on IRC today. Is this a bug in ksh93u+?
[17:17:08] <jperkin> should it be considered a bug that ksh's built-in head
doesn't handle lines with newlines? compare 'printf "foo" >bar; head -1 bar'
with /usr/bin/head [17:19:10] <jperkin> whatever the ksh93 variant is in OSX
doesn't have the same behaviour
Irek
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers