Add script log-f3wr

This script runs f3write and f3read, echos their output to
the terminal, and records their output into a log file.
This commit is contained in:
Michel Machado 2014-08-21 13:47:23 -04:00
parent 9604f8b3df
commit 3263201548
3 changed files with 30 additions and 2 deletions

25
README
View File

@ -19,9 +19,32 @@ f3read.1 - Man page for f3read and f3write.
In order to read this manual page, run 'man ./f3read.1'.
To install the page, run
'install --owner=root --group=root --mode=644 f3read.1 /usr/share/man/man1'.
f3write.h2w - Bash script to create files exactly like H2testw.
LICENSE - License (GPLv3).
Makefile - make(1) file.
README - This file.
*.h and *.c - C code of F3.
## Bash scripts
Although the simple scripts listed in this section are ready for use,
they are really meant to help you to write your own scripts.
So you can personalize F3 to your specific needs.
f3write.h2w - Script to create files exactly like H2testw.
Use example: 'f3write.h2w /media/5EBD-5C80/'
log-f3wr - Script that runs f3write and f3read, and records
their output into a log file.
Use example: 'log-f3wr log-filename /media/5EBD-5C80/'
Please notice that all scripts and use examples above assume that
f3write, f3read, and the scripts are reachable from
your environment PATH variable.
If that is not the case, but all of them are in your current path,
prefix the use examples above with 'PATH=$PATH:./' as shown below
for the script log-f3wr:
PATH=$PATH:./ log-f3wr log-filename /media/5EBD-5C80/
The current path is represented by './' in the previous example.

View File

@ -1,7 +1,7 @@
Version 3.1 - Sep 21, 2014
* add optional parameter --end-at=NUM to F3.
* add script f3write.h2w.
* add scripts f3write.h2w and log-f3wr.
* unify Makefile.
* general code review.

5
log-f3wr Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
LOG=$1
f3write "${@:2}" 2>&1 | tee -a "${LOG}" && \
echo -e "\n\n" >> "${LOG}" && \
f3read "${@:2}" 2>&1 | tee -a "${LOG}"