fbexport
fbexport copied to clipboard
Add silent mode
On Export you write this to STRERR:
Connecting to: 'LOCALHOST' as 'SYSDBA'...Connected.
Creating and starting transaction...Done.
Create statement...Done.
Prepare statement...Done.
Exec statement...Done.
Exporting data as INSERT statements...
Start : Sat Oct 5 12:17:46 2019
End : Sat Oct 5 12:17:47 2019
Elapsed : 1 seconds.
*** rows exported to ***.
Transaction commited.
- Add some cmdline option to suppress these lines (leave only real errors if they are). This is the feature request.
- It's not an errors (why to STRERR?)
Current workaround:
./fbexport -Si -C 100000 -D ***.gdb -P *** -F transactions_tmp.sql -Q \
$"select..." 2>&1 \
| grep -v \
-e '\w\.\.\.Done.$' \
-e '^Exporting data as INSERT statements\.\.\.$' \
-e '^Connecting to: ' \
-e '^Elapsed : ' \
-e '^Start : ' \
-e '^End : ' \
-e '^$' \
-e '^.\+ rows exported to .\+\.$' \
-e '^Transaction commited\.$'
Now it's usable in crontab.