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
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
xxx_$(date +%D).log
Thanks
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
$
help please. Anyone.
Remove the *
mv nashua* nashua_$(date +%D).log