![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Split large file and add header and footer to each small files | ashish4422 | Shell Programming and Scripting | 7 | 07-07-2008 02:13 PM |
| Split large file and add header and footer to each file | ashish4422 | Shell Programming and Scripting | 1 | 04-15-2008 06:12 AM |
| rowcnt except Header & Footer | vsubbu1000 | Shell Programming and Scripting | 3 | 08-03-2007 04:50 AM |
| remove header and footer rows | seaky | Shell Programming and Scripting | 2 | 11-10-2006 11:18 AM |
| Need to Chop Header and Footer record from input file | coolbudy | Shell Programming and Scripting | 4 | 08-09-2005 12:26 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|