]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Use seq, not `yes' to generate link target.
authorJim Meyering <jim@meyering.net>
Fri, 28 Mar 2003 14:02:58 +0000 (14:02 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 28 Mar 2003 14:02:58 +0000 (14:02 +0000)
Otherwise, on systems (DJGPP) that emulate pipes using files,
this test would never complete, waiting for `yes' to terminate.

tests/du/slink

index 7469b91387e1289c55f8529ab537d12d9495e571..fecd39770c35d0bffaf7a67f80a2cd0a0b6eee5b 100755 (executable)
@@ -34,7 +34,7 @@ fi
 fail=0
 symlink_name_lengths='1 15 16 31 32 59 60 63 64 127 128 255 256 511 512 1024'
 for len in $symlink_name_lengths; do
-  name=`yes|tr '\n' y|head -c$len`
+  name=`seq 1 $len|tr -c x y |head -c$len`
   # Record the names of symlinks that are successfully created.
   ln -fs $name $len > /dev/null 2>&1 \
     && symlinks="$symlinks $len"