Trying to use a single while loop to collect variables from user and run sequential "at" commands. Singular at command works, trying to combine fails without errors. In this particular case, output shows that the jobs are created, however the first action is never completed.
#!/bin/bash
PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:/usr/openv/volmgr/bin
read -p "Enter the time and date to deactivate the policies (format - 24hr Month Date example 0400 May 09) : " offtime
read -p "Enter the time and date to reactivate the policies (format - 24hr Month Date example 0400 May 09) : " ontime
while read -r i;
do
bpplinfo $i -modify -inactive | at $offtime;
bpplinfo $i -modify -active | at $ontime
done < /tmp/policies.txt
echo command to send string to at, works great.
#!/bin/bash
PATH=$PATH:/usr/openv/netbackup/bin:/usr/openv/netbackup/bin/admincmd:/usr/openv/volmgr/bin
read -p "Enter the time and date to deactivate the policies (format - 24hr Month Date example 0400 May 09) : " offtime
read -p "Enter the time and date to reactivate the policies (format - 24hr Month Date example 0400 May 09) : " ontime
while read -r i;
do
echo "bpplinfo $i -modify -inactive" | at $offtime;
echo "bpplinfo $i -modify -active" | at $ontime
done < /tmp/policies.txt