On 01.07.2010 01:40, Petter Reinholdtsen wrote: > [Michael Biebl] >> Agreed, if it can be changed to work without find (or anything from >> /usr/), this is of course the better solution. > > This is the problematic line: > > SAVEDSIZE="$(find "$SAVEDFILE" -printf "%s")" > > > The find line prints the size of the file in bytes. > > Not quite sure what the best option is, but this line seem to work > too, using ls and cut from /bin/. > > SAVEDSIZE="$(ls -s --block-size=1 "$SAVEDFILE" | cut -d' ' -f1)" > > Anyone got a better idea?
TBH, I'm not actually sure what all the code in /etc/init.d/urandom is supposed to do and why SAVEDSIZE is necessary at all. that said, given your code above, I get differing results for this simple example: $ echo foo > /tmp/bar $ find /tmp/bar -printf %s 4 $ ls -s --block-size=1 /tmp/bar | cut -d' ' -f1 4096 -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature