append 442 B

1234567891011121314151617
  1. #APPE $FISH_FILESIZE $FISH_FILENAME
  2. FILENAME="/${FISH_FILENAME}"
  3. echo "### 001"
  4. {
  5. > "${FILENAME}"
  6. bss=4096
  7. bsl=4095
  8. if [ $FISH_FILESIZE -lt $bss ]; then
  9. bss=1;
  10. bsl=0;
  11. fi
  12. while [ $FISH_FILESIZE -gt 0 ]; do
  13. cnt=`expr \\( $FISH_FILESIZE + $bsl \\) / $bss`
  14. n=`dd bs=$bss count=$cnt | tee -a "${FILENAME}" | wc -c`
  15. FISH_FILESIZE=`expr $FISH_FILESIZE - $n`
  16. done
  17. }; echo "### 200"