The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 07-06-2009
Starcast Starcast is offline
Registered User
  
 

Join Date: Jan 2009
Location: Minneapolis, MN
Posts: 13
Ok, so I turned my brain on and figured out my solution... I hate it when I catch myself getting lazy on here...

For anyone following the thread, this does what I described needing
Code:
trap 'CUR=$END 
sleep 1 
echo -e "\E[31;40m\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
\n+                   WARNING - Early Exit                         +
\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
\E[30;47m\n++ Format: $FORMAT    ++ Min Remaing on $destination : $minremain    
\n++ Deck: $deck_number          ++ Customer: $customer      
\n++ Rec Time: $tape_length  ++ Tape: $tapename"
exit ' 2
Oh, I added the 'sleep' to account for DVgrab's exit info that it prints... otherwise I was getting a few lines printed after the warning...

And I added 'exit' at the end so that the script didn't continue after killing the countdown function

-Starcast