Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


Total of lines w/out header and footer incude for a file


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Question Total of lines w/out header and footer incude for a file

I am trying to get a total number of tapes w/out headers or footers in a ERV file and append it to the file. For some reason I cannot get it to work. Any ideas?

#!/bin/sh
dat=`date +"%b%d_%Y"`
+ date +%b%d_%Y
dat=Nov16_2006
tapemgr="/export/home/legato/tapemgr/rpts"
tapemgr=/export/home/legato/tapemgr/rpts
ERVTAPE_RET="$tapemgr/returns/ervtape_ret.$dat"
ERVTAPE_RET=/export/home/legato/tapemgr/rpts/returns/ervtape_ret.Nov16_2006
tmpct=$tapemgr/tmp/tmptct.out
tmpct=/export/home/legato/tapemgr/rpts/tmp/tmptct.out
cat /dev/null > $tmpct
+ cat /dev/null
#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
+ echo \nERV: Please return the following list of IP Tapes for the BUR Group - STK9310-TSM Library\n
mminfo -r volume,pool,location,volretent -q location=ERV| grep expired | wc -l >tmp.out
+ mminfo -r volume,pool,location,volretent -q location=ERV
+ wc -l
+ grep expired
mminfo -r volume,pool,location,volretent -q location=ERV| grep expired >> $ERVTAPE_RET
+ grep expired
+ mminfo -r volume,pool,location,volretent -q location=ERV
sed -n '$=' $ERVTAPE_RET ; echo "Total Tapes Return Requested ..." >>tmp.out $ERVTAPE_RET
+ sed -n $= /export/home/legato/tapemgr/rpts/returns/ervtape_ret.Nov16_2006
7
+ echo Total Tapes Return Requested ... /export/home/legato/tapemgr/rpts/returns/ervtape_ret.Nov16_2006
cut -c1-8 $ERVTAPE_RET > erv.cutout
+ cut -c1-8 /export/home/legato/tapemgr/rpts/returns/ervtape_ret.Nov16_2006

## Send Email to request tape returned
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Eliminate Header and footer from EBCDIC file
abhilashnair
Is there any command to eliminate Header and footer from EBCDIC file... UNIX for Dummies Questions & Answers
4
UNIX for Dummies Questions & Answers
Is there a way to append both at header and footer of a file
jediwannabe
currently I've a file Insert into CD_CARD_TYPE (CODE, DESCRIPTION, LAST_UPDATE_BY, LAST_UPDATE_DATE) Values ('024', '024', 2, sysdate); Insert into CD_CARD_TYPE (CODE, DESCRIPTION, LAST_UPDATE_BY, LAST_UPDATE_DATE) Values ('032', '032', 2, sysdate); ........ is it...... Shell Programming and Scripting
3
Shell Programming and Scripting
Removing header or footer from file
sridhardwh
Hi Every one, what is the coomand to remove header or footer from a file. Please help me by providing command/syntax to remove header/footer from unix. Thanks in advance for all your support.... Shell Programming and Scripting
5
Shell Programming and Scripting
Add header and footer with record count in footer
itsranjan
This is my file(Target.txt) name|age|locaction abc|23|del xyz|24|mum jkl|25|kol The file should be like this 1|03252012 1|name|age|location 2|abc|23|del 2|xyz|24|mum 2|jkl|25|kol 2|kkk|26|hyd 3|4 Column 1 is row indicator for row 1 and 2, column indicator is 1,for data rows...... Shell Programming and Scripting
1
Shell Programming and Scripting
sort a report file having header and footer
suryanarayana
I am having report file with header and footer . The details in between header and footer are separated by a pipe charater. I want to sort the file by considering multiple columns in between header and footer. pls help... Shell Programming and Scripting
4
Shell Programming and Scripting

Featured Tech Videos