bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash3 on FreeBSD weirdness


From: Miek Gieben
Subject: bash3 on FreeBSD weirdness
Date: Wed, 28 Jun 2006 20:01:34 +0200
User-agent: Vim/Mutt/Linux

[please cc me, I'm not on this list]

Hello,

I'm encoutering some weird behavoir with bash3 on freebsd. I've written
a little tool that echo's a filelist (+optional content) to standard
output. This list is then acted upon by a shell script.
(www.miek.nl/projects/rdup is the program in question)

With this, you get the output of a bin/ directory:
% ./rdup /dev/null bin
+16877 1000 20 11 0 /home/miekg
+16877 1000 20 15 0 /home/miekg/svn
+16877 1000 20 20 0 /home/miekg/svn/rdup
....
etc

Now, with a -c switch you also get the contents. On Linux this works:
% ./rdup -c /dev/null bin | ./sh-tools/mirror.sh -c -b /tmp/storage
** #REG FILES  : 49
** #DIRECTORIES: 7
...

This creates a dump of all the files in /tmp/storage. On freeBSD I 
get the following:
% ./rdup -c /dev/null bin | ./sh-tools/mirror.sh -c -b /tmp/storage
** #REG FILES  : 0
** #DIRECTORIES: 1

So only one directory is copied?

The mirror.sh script uses a 'while -r read'-loop
to read from standard input. It looks like the while loop terminates
after 1 loop on FreeBSD, where as it goes on Linux. How can this be?

Thanks for any replies!

--
grtz,
  - Miek

  http://www.miek.nl              
  PGP: 6A3C F450 6D4E 7C6B C23C  F982 258B 85CF 3880 D0F6

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]