![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Variable value not being fetched in the filename.. | RRVARMA | Shell Programming and Scripting | 3 | 06-01-2008 02:43 AM |
| shortcut for tar cvf - [filename] | gzip > [filename].tar.gz | bcamp1973 | UNIX for Dummies Questions & Answers | 4 | 12-11-2007 01:45 PM |
| rm $(filename)* | sakthi.abdullah | Shell Programming and Scripting | 4 | 12-20-2006 05:16 AM |
| How to send filename as variable in a shell script | gthokala9 | Shell Programming and Scripting | 6 | 06-27-2006 10:23 AM |
| AWK Filename as variable | firkus | UNIX for Dummies Questions & Answers | 4 | 04-16-2004 07:50 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
mv Filename variable to another filename
Anyone who can assist :
I am trying to pass the group vairiable to a filename: rpt_tsavegrp=/export/legato/scripts/$group_savegrp_rpt.$dat It will not pass to variable. Anyone have any ideas what I am doing wrong here. Thanks # This script sends email that save group completed. #!/bin/ksh dat=`date +%m%d%y` rdat=`date +%m/%d/%y` savegrp=/export/legato/scripts/savegrp_rpt.tmp rpt_tsavegrp=/export/legato/scripts/$group_savegrp_rpt.$dat cat $* > $savegrp group=`head -1 $savegrp |grep -v -i media |awk '{print $4,$5}'`>/dev/null #/usr/ucb/mail -s "$group Test Savegroup Report - $rdat" < $savegrp #cp $savegrp $rtp_savegrp |
| Forum Sponsor | ||
|
|
|
|||
|
For some reason, my $group vairable will not pass to the $savgrp_rpt.
Still doesn't work. # This script sends email that save group completed. #!/bin/ksh dat=`date +%m%d%y` rdat=`date +%m/%d/%y` tmp_savegrp=/export/legato/rpts/savegrp.tmp cat $@ > $tmp_savegrp group=`head -1 $tmp_savegrp |grep -v -i media |awk '{print $4,$5,$10}' /usr/ucb/mail -s "$group Savegroup Report - $rdat" xxxx@xxx.com < $tmp_savegrp savgrp_rpt=/export/legato/rpts/${group}_savegrp_rpt.$dat cp $tmp_savegrp $savgrp_rpt ~ |