10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am new to shell scripting and I have a requirement of getting first day of specific month.
eg i need 1st day of oct 2014
S M Tu W Th F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
output... (4 Replies)
Discussion started by: simsim90
2. Shell Programming and Scripting
I have many files called day001, day002, day003 and I want to rename them by day20070101, day20070102, etc.
I need to do it for several years and leap years as well.
What is the best way to do it ?
Thank you. (1 Reply)
Discussion started by: Ggg
3. Shell Programming and Scripting
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
Discussion started by: pnara2
4. Shell Programming and Scripting
I am using the code below modified from a post I saw here regarding having the script write out future dates. The problem is that instead of making 8/1 it makes 7/32! Please help!
echo "Today is : $yy $mm $dd"
date '+%m... (5 Replies)
Discussion started by: libertyforall
5. Shell Programming and Scripting
Recently I was on an operational call and heard the people running my code placing the code in the /tmp directory and running as root. I had not planned on that. So I want to add some checks to my code (using ksh93):
# ---------- ---------- ----------
# root not allowed to run this
#... (3 Replies)
Discussion started by: ericdp63
6. Shell Programming and Scripting
I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this.
My Requirment is as below:
Input for me will be 2000909(YYYYMM)
I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
7. UNIX for Dummies Questions & Answers
I have a script that finds the application logs from the previous day and sends it to another server via ftp.
The code is something like this:
yest_date=`TZ=CST+24 date "+%b %d"`
for i in `ls -1 $logs`
chkstr=`ls -1l $i | grep... (2 Replies)
Discussion started by: tatchel
8. Shell Programming and Scripting
how to know whether a script ran from the cron is successful or not.. if sucess/failure mail the status..
achneaz (2 Replies)
Discussion started by: achneaz1
9. Shell Programming and Scripting
I am a beginner in unix.
Can anyone tell me how to get the last day of the last month in 'yyyymmdd' format? eg. today is 20050909, I want to get 20050831.
Thanks in advance. (2 Replies)
Discussion started by: emily79
10. Shell Programming and Scripting
I am relatively new to unix...
Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell..
This is very urgent.
Thanks for ur help... (7 Replies)
Discussion started by: phani