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 784B

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