The UNIX and Linux Forums  

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Maintain full path of a script in a var when sourcing it from a different script mrbluegreen Shell Programming and Scripting 4 03-19-2008 10:31 PM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 03:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 04:06 AM
how to find Script file location inside script asami Shell Programming and Scripting 10 03-15-2006 12:57 AM
return valuse from child script to parent script borncrazy Shell Programming and Scripting 1 08-20-2004 04:39 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-16-2006
gzs553 gzs553 is offline VIP Member  
Supporter
  
 

Join Date: Oct 2006
Posts: 42
Wink Need help with this script..please..thks

I want to be able to count the number of items in my file, excluding headers and footer, and put my total where it say "total tapes" back into the same file.

Anyone ..please..thanks.


# Script to request returned expired tapes from ERV
############ 11/10/06

#!/bin/sh
dat=`date +"%b%d_%Y"`
tapemgr="/export/home/legato/tapemgr/rpts"
ERVTAPE_RET="$tapemgr/returns/ervtape_ret.$dat"
tmpct=$tapemgr/tmp/tmptct.out
cat /dev/null > $tmpct
#rm $rpt/*.out $rpt/*.rpt

######## Run Report for Return Tapes
echo "\nERV: Please return the following list of IP Tapes for the BUR Group - STK9310-TSM Library\n" > $ERVTAPE_RET
mminfo -r volume,pool,location,volretent -q location=ERV| grep expired | wc -l >tmp.out
mminfo -r volume,pool,location,volretent -q location=ERV| grep expired >> $ERVTAPE_RET
sed -n '$=' $ERVTAPE_RET ; echo "Total Tapes Return Requested ..." >>tmp.out $ERVTAPE_RET
cut -c1-8 $ERVTAPE_RET > erv.cutout

## Send Email to request tape returned
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:08 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0