Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Output of "wc" is not reliable (variable number of spaces).
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 29 Oct 2013 07:52:54 +0000 (08:52 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Tue, 29 Oct 2013 10:14:08 +0000 (11:14 +0100)
Did not find any handy replacement for "wc -c", so only count the
number of lines in IO-bigsize.

tools/tesh/IO-bigsize.tesh
tools/tesh/basic.tesh

index 5f4e02b..f6e79f9 100644 (file)
@@ -1008,8 +1008,8 @@ p First, a write test
 < 997 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 < 998 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 < 999 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-$ wc -c
-> 150000
+$ sed -n '$='
+> 1000
 
 p And now, a read/write test
 
index 6eeb3c1..32289af 100644 (file)
@@ -32,8 +32,8 @@ $ cat tmp_fich
 > c
 > d
 
-$ wc -l tmp_fich
-> 4 tmp_fich
+$ sed -n '$=' tmp_fich
+> 4
 
 $ rm tmp_fich