![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| quick sed help | katrvu | Shell Programming and Scripting | 3 | 02-20-2008 11:54 PM |
| Need quick help | SanjayLinux | Shell Programming and Scripting | 1 | 09-25-2007 06:36 AM |
| i need quick help???...please | M_Hafez | UNIX for Dummies Questions & Answers | 3 | 01-14-2005 04:22 AM |
| Quick Q, DNS | sajjan2 | UNIX for Dummies Questions & Answers | 1 | 04-22-2002 09:50 AM |
| Quick Question | Tracy Hunt | UNIX for Dummies Questions & Answers | 3 | 02-20-2001 01:20 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
Quick one
Hallo friends,
I have a log file called xxx.log which is generated everymorning. I want to change this file to xxx_[today's date].log Please assist, i am using ksh on AIX. Ta, Pax |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
xxx_$(date +%D).log
Thanks |
|
#3
|
||||
|
||||
|
Thats how my script looks like. You suggestion didnt work. Any more suggestions?
$ cat mtn_statistics.ksh #!/bin/ksh set -x ######################################################################### # # Name: # statistics.ksh # # Details: # Performs a series of queries on the database to analyse application performance; # reports on backlog of data files. Produces a report for e-mailing to recipients. # Crontab (non-interactive) invocation. # # Usage: # To compile a number of statistics for MTN and for the SP's # ######################################################################## # Author: # Paxley Kekana # # Revision History: # Date Author Details # 300108 PK First version # 300108 PK Added ORACLE_SERVER_SID to accomodate SID and # alias differences ######################################################################### # Set the ORACLE_SID to ORACLE_SERVER_SID and run script export ORACLE_SID_BACKUP=${ORACLE_SID} export ORACLE_SID=${ORACLE_SERVER_SID} date="1 days" +%Y%m%d #Scripts are starting to run# cd /minotaur/Scripts # /usr/bin/cat <<EOF | $ORACLE_HOME/bin/sqlplus -s /@${ORACLE_SID} /usr/bin/cat <<EOF | $ORACLE_HOME/bin/sqlplus super_conf/super_conf@pfrd @nashua.sql @autopage.sql @italk.sql @mtn_sp.sql @ticket_sp_fraudtype.sql exit EOF cd ../Log mv nashua* nashua_$(date +%D).log mv autopage* autopage_$(date +%D).log mv italk* italk_$(date +%D).log mv mtnsp.log mtnsp_$(date +%D).log mv summary_fraud_per_sp.log summary_fraud_per_sp_$(date +%D).log $ |
|
#4
|
||||
|
||||
|
help please. Anyone.
|
|
#5
|
|||
|
|||
|
Remove the *
mv nashua* nashua_$(date +%D).log |
|||
| Google The UNIX and Linux Forums |