fjfs is FUSE module that implements virtual joining of multiple files as one. https://georgi.unixsol.org/programs/fjfs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.sh 893B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. set -e
  3. dotest()
  4. {
  5. cat testmnt.txt
  6. head -c 20 testmnt.txt
  7. tail -c 20 testmnt.txt
  8. head -c 160 testmnt.txt | tail -n 1
  9. echo
  10. cnt1=`wc -c test1 | (read a b; echo "$a")`
  11. if ! expr "x$cnt1" : 'x[0-9][0-9]*$' > /dev/null; then
  12. echo 'Could not count the characters in the test1 file'
  13. exit 1
  14. fi
  15. cnt2=`wc -c test2 | (read a b; echo "$a")`
  16. if ! expr "x$cnt2" : 'x[0-9][0-9]*$' > /dev/null; then
  17. echo 'Could not count the characters in the test2 file'
  18. exit 1
  19. fi
  20. cnt3=`wc -c test3 | (read a b; echo "$a")`
  21. if ! expr "x$cnt3" : 'x[0-9][0-9]*$' > /dev/null; then
  22. echo 'Could not count the characters in the test3 file'
  23. exit 1
  24. fi
  25. head -c "$cnt1" testmnt.txt | diff -u test1 -
  26. tail -c "$cnt3" testmnt.txt | diff -u test3 -
  27. cat test1 test2 test3 | diff -u - testmnt.txt
  28. }
  29. rm -f testmnt.txt
  30. res=0
  31. ./mount.sh
  32. (dotest) || res=$?
  33. ./umount.sh
  34. rm -f testmnt.txt
  35. exit "$res"