Re: Ontape -s , multiple tapes & cron.
Posted in 1998
Hi Jacob,
I try to explain the original idea as following:-
# filename: ontape_agent
read x # Read whatever comes into stdin and
# assume it is ontape asking the user
# to press RETURN to continue
ln -s /dev/rmt/0m /dev/ArchTape # Establish link for TAPEDEV device
echo # Simulate pressing RETURN
read x # Read STDIN again; same assumption
ln -s /dev/rmt/1m /dev/ArchTape # Bump TAPEDEV link to next tape drive
echo # Again, simulate pressing RETURN
## mistake, more accurately, it should be "sleep 3600 <pipefile &", you
## can increase the number of second if necessary.
## once ontape_agent exit, there is no process reading this pipe,
## any process keep writing to "pipefile" will be forced exit as well.
## here, it is "tee"
sleep 100 >pipefile & # Duh.. What does this do for us?
#
# The pipeline below reads from the
# pipe, pipes its blank lines to
# ontape, propagating the simulated # RETURN key and sending ontape's
# prompts to the pipe file
## since we use "tee pipefile", we can read the output of ontape on
## our terminal, or we will receive it by mail if this command is
## activated by cron.
ontape_agent <pipefile | ontape -s | tee pipefile
# Yes, it is circular, but so is I/O to
# any terminal.
## some other comments:
## 1. I think "ontape -s -Lx" may be better then "ontape -s"
## 2. We can just use "ontape_agent <pipefile | ontape -s -L0 >pipefile",
## but the "ontape_agent" need to be much more complex.
## 3. This is basically just an idea, I believe you have to fine tune the
## file "ontape_agent" in order to make it for realword use.
Feel free to make comments, or make changes if you want.:)
Thanks,
Ken.
Jacob Salomon wrote in message <34C8EF49.E82FAF22@garpac.com>...
>Ken,
>
>I like your idea very much but I need some comments to fully understand
>it. I am posting it with MY comments for the benefit of the family.
>Please fill the gaps and repost - I want to save this! (IMO it belongs
>in the iiug archives!)
>