Follow-up Comment #3, bug #56410 (project findutils):
Oops, here is a corrected script (the previous one had a missing "!" in the
if.
#!/bin/bash
set -u
if ! top="$(mktemp -d)"; then echo "Failed to create a temporary directory"
>&2; exit 1; fi
(
set -eCu
cd "${top}"
mkdir temp temp2
echo "test" >| temp/file0.txt
( cd temp2 && ln -s ../temp/file0.txt file )
if ! wc -c < temp2/file >/dev/null ; then exit 1; fi
echo
echo with -L
find -L temp2/ -type f -ls
echo "(ends)"
echo
echo without -L
find temp2/ -type f -ls
echo "(ends)"
echo
echo with -L ... -exec file
find -L temp2/ -type f -exec file '{}' \;
echo "(ends)"
echo
)
rv=$?
ls -ltR "${top}"
rm -rf "${top}"
exit $rv
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56410>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/