Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: while read; problems



Here's a test.

Index: Test/B04read.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/B04read.ztst,v
retrieving revision 1.2
diff -u -r1.2 B04read.ztst
--- Test/B04read.ztst	9 Jul 2003 11:04:03 -0000	1.2
+++ Test/B04read.ztst	25 Apr 2005 10:33:38 -0000
@@ -69,3 +69,10 @@
 0:read with null delimiter
 >Testing the
 >null hypothesis
+
+# Note that trailing NULLs are not stripped even if they are in
+# $IFS; only whitespace characters contained in $IFS are stripped.
+ print -n $'Aaargh, I hate nulls.\0\0\0' | read line
+ print ${#line}
+0:read with trailing metafied characters
+>24

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author