In C Shell programming I haven't successfully been able to append the date in the format mmddyyyy to a filename. I've tried the following:
I can print out the date in the correct format: date +%x | sed ‘s/\///g
I can create a variable with the filename: set newfile=changedfiles
I can... (3 Replies)
Hi,
I am trying to append date in DAY_Mon_dd_yyyy at the end of a filename from cron.
Cron entry looks as below.
(script to execute) > test_file_`date +"a_%b_%d_%Y"`
File name created after executing the job is test_file_
I am expecting the filename to be something like ... (8 Replies)
Hi
I need to append date to filename.Wrote script to get the date from table ,take this date filed and append to my i/p file when call the below script.Any help should be appreciated .
Exampel
If call the below script
a4.sh filename
o/p should be
filename.2008-02-29
.... (6 Replies)
Hello,
I am a novice user on an AIX 5.3 system.
I am running some scripts via crontab and redirecting the output to a file.
For example: /home/cognos/ppdev_refresh.sh > /home/cognos/ppdev_refresh.txt
I want to append the system date to the file name so it becomes:... (7 Replies)
Hi guys,
I created a very basic script that moves a specified file to a directory that I have set using the mv command. What I would like to do is append the file name with the date and time.
So if I was to use the script to move a file called abc.txt, the script should rename the file... (1 Reply)
Hi everyone,
I need to create a script which dynamically splits Flatfiles and append a date. Only those should be splitted if they have more than a million rows but the date should be append every time.
E.g. in my folder I have 3 flat files and only 1 of them has more than a million rows. ... (3 Replies)
To delete log files content older than 30 days and append the lastest date log file date in the respective logs
I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs
This is my script
cd... (2 Replies)
Hello,
I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead.
Here's what I... (5 Replies)
This works except the date being sent to this script.
Is it because I am trying to write to an executing script?
Is there a better way?
date '+%m-%d-%Y_%I:%M-%p'>> Send_Email.sh
CONTENT="Backup to Maxtor Drive has occured."
echo "Sending email."
/usr/sbin/ssmtp -t << EOF
To:... (1 Reply)