9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have the below requirement ,
if i give the week number for ex 41 i need to get the date for Monday and thursday for this given week. my expected output is 13/10/2014 (Monday's date) and 16/10/2014 (Thursday's date)
I am using GNU LINUX .
Pls help me with your thoughts.
Thanks in... (7 Replies)
Discussion started by: mohanalakshmi
7 Replies
2. UNIX for Dummies Questions & Answers
I have been volunteered by my boss to be the sysadmin for our production redhat server. He asked me to tighten the security to avoid mishaps like "rm -f *" that occured not long ago.
Right now, we have 53 users sudo-ing into the machine and it is an audit nightmare. I am wondering if it... (15 Replies)
Discussion started by: alan
15 Replies
3. Shell Programming and Scripting
Hello All,
I am writing a script in Sun Solaris
I want the date for "day before yesterday", i got the yesterday's date by this command TZ=GMT+24 date +%b" "%d.
Please suggest me some code to get the date for day before yesterday (6 Replies)
Discussion started by: anand2308
6 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I need to know how to derive the day of the week by passing the value in following format:
Feb 28 2010
The output I'm expecting is Sunday or Sun.
I know, I can use the following code to get the day of the week.
date +%a
But I want to pass the value as a string. Please help... (11 Replies)
Discussion started by: shash
11 Replies
5. Shell Programming and Scripting
Hi all, I am trying to get dow from cal using below script
#! /bin/bash
YEAR=`echo $1 | cut -c 1-4`
MONTH=`echo $1 | cut -c 5-6`
DAY=`echo $1 | cut -c 7-8`
for i in 1 2 3 4 5 6 7
do
dayofweek=`cal $MONTH $YEAR | awk '$i == $DAY {printf("%s","$i")}'`
echo $dayofweek... (4 Replies)
Discussion started by: bzylg
4 Replies
6. Shell Programming and Scripting
Hi
i am having a backup folder wherein i will be having the files ftp ed to remote server, i need to keep only the data of last two days and remove the old log files.
how can i achieve this ?
i have tried...
#!/bin/bash
D=`date +'%d'`
oldday=`expr $D - 2`
rm /sent/data-$oldday*
echo... (8 Replies)
Discussion started by: aemunathan
8 Replies
7. Shell Programming and Scripting
Dear All,
Actually, i'm doing some reporting job and i need to pass yesterday's date in Year-Month-Day format(e.g. 2009-06-10) to another program for generating 2009-06-10 report.
to get today's date, it's easy to just date '+%Y%m%d' , but no idea how can i get this kind of format for... (2 Replies)
Discussion started by: tiger2000
2 Replies
8. HP-UX
Hi All,
I have date in string format 'YYYY-MM-DD'. I want to know day of the week for this date.
Example. For '2005-08-21' my script should return '0' or Sunday
For '2005-08-22' it should return '1' or Monday
I want piece of code for HP-UX korn shell.
Appreciate reply on this. (5 Replies)
Discussion started by: vpapaiya
5 Replies
9. Programming
Hi ,
I am working at Unix system,using c lang.
I need c fun which return the day of the week .
For example :
0- Sunday.
1- Monday.
....
10x. (4 Replies)
Discussion started by: kamil
4 Replies