I want to write a script which executes the following commands:
./virtuoso-t -f -c /home/var/lib/virtuoso/db/virtuoso.ini
which gives the following output -- after "Server online at 1111" appears on screen I want to issue another command ./isql 1111 dba dba. I dont want to issue the command "./isql 1111 dba dba" before "Server online at 1111" appears on screen -- the command ./isql 1111 dba dba should be issued in different session (screen, etc) as I want ./virtuoso-t to remain online while I execute my commands -- is there some way by which I may achieve the same
Mon Aug 03 2015
17:08:49 { Loading plugin 1: Type `plain', file `wikiv' in `/home/jyotil/VirtuosoHugh/virtuosoInstalled/lib/virtuoso/hosting'
17:08:49 FAILED plugin 1: Unable to locate file }
17:08:49 { Loading plugin 2: Type `plain', file `mediawiki' in `/home/jyotil/VirtuosoHugh/virtuosoInstalled/lib/virtuoso/hosting'
17:08:49 FAILED plugin 2: Unable to locate file }
17:08:49 { Loading plugin 3: Type `plain', file `creolewiki' in `/home/jyotil/VirtuosoHugh/virtuosoInstalled/lib/virtuoso/hosting'
17:08:49 FAILED plugin 3: Unable to locate file }
17:08:49 OpenLink Virtuoso Universal Server
17:08:49 Version 07.20.3213-pthreads for Linux as of Apr 10 2015
17:08:49 uses parts of OpenSSL, PCRE, Html Tidy
17:08:59 Database version 3126
17:09:00 SQL Optimizer enabled (max 1000 layouts)
17:09:01 Compiler unit is timed at 0.000687 msec
17:09:38 Roll forward started
17:09:38 Roll forward complete
17:09:52 Checkpoint started
17:09:54 Checkpoint finished, log reused
17:09:57 HTTP/WebDAV server online at 8890
17:09:57 Server online at 1111 (pid 4972)
For doing so I wrote the following shell script in (myScript.sh):
./virtuoso-t -f -c /home/var/lib/virtuoso/db/virtuoso.ini
./isql 1111 dba dba
However it appears that ./isql 1111 dba dba gets executed before "Server online at 1111" appears on screen. Is there some way in either python (by invoking the commands from python or c++ or using linux commands with which I may achieve the desired behaviour?
The command "./virtuoso-t -f -c /home/var/lib/virtuoso/db/virtuoso.ini" does not terminate, it remains online with the output "Server online at 1111" and in another terminal I execute queries on it using ./isql 1111 dba dba