10 More Discussions You Might Find Interesting
1. Linux
Hello,
I need to find the date of next first Friday of the month and set as a variable in a bash script
ie -
FIRSTFRIDAY=$(date -dfirst-friday +%d)
I know date -dfirst-friday doesn't work, but unsure if I can use this / cal + awk or something else to find the right date of the... (7 Replies)
Discussion started by: summerdays
7 Replies
2. Shell Programming and Scripting
Hi,
I want two dates one will be the current date and the other one will be just one month before. Say if current month is 11/4/2014 then the other date should be 11/3/2014.
#!/bin/ksh
currentDtae=`date`
oneMonthBefore= ?
I dont know how to do it. Went through some of the related threads... (15 Replies)
Discussion started by: Sharma331
15 Replies
3. UNIX for Advanced & Expert Users
Hi All,
I need to find last two files for the month.
lets say there are following files in directory
-rwxr-xr-x 1 user userg 1596 Mar 19 15:43 c.txt
-rwxr-xr-x 1 user userg 1596 Mar 21 15:43 d.txt
-rwxr-xr-x 1 user userg 1596 Mar 22 15:43 f.txt
-rwxr-xr-x 1... (14 Replies)
Discussion started by: Makarand Dodmis
14 Replies
4. Red Hat
Hello,
Can you please help me find/display out last Friday's date of the month using command in Unix/Linux (3 Replies)
Discussion started by: sunnysthakur
3 Replies
5. UNIX for Dummies Questions & Answers
Hi Expert
Please help me to set a cron job schedule,
Ihave a job that run every 3rd Friday of the month at 1030am.
I tried to set up like this, but the job still runs every friday at 1030am.
I want the job to run every 3rd Friday of the month at 1030am only
30 10 15,16,17,18,19,20,21... (2 Replies)
Discussion started by: kaibiganmi
2 Replies
6. Shell Programming and Scripting
I needed a cron job to run on the second to last friday of every month. Our servers are running HP-UX, and the HP-UX date command is pretty basic and does not have all of the fancy options that Linux date command does, and it does not have the ability at all to return future dates. So I had to... (0 Replies)
Discussion started by: lupin..the..3rd
0 Replies
7. Shell Programming and Scripting
Hi,
I need to get the date of last friday of every month. how can i achieve this ? please guide me.
Thanks in advance (3 Replies)
Discussion started by: apsprabhu
3 Replies
8. UNIX for Dummies Questions & Answers
I would like to find out the month from a given date,
how is it possible. (5 Replies)
Discussion started by: rudoraj
5 Replies
9. Shell Programming and Scripting
I am trying to write a script that shows every Friday in a month.
I used
cal $1 $2 | grep -v "^$" | awk '{print $6}'
It doesn't work for the frist week of Friday because calendar command output has some spaces in the first line and awk '{print $6}' doesn't work. Anybody help
me with this... (3 Replies)
Discussion started by: LAY
3 Replies
10. Shell Programming and Scripting
Hi,
I am trying to do achieving of files by months.
find /test -name \*.* -mtime +30
will give me the result of all modified files after 30 days.
But lets say i want to list all files that is modified in last months... what is the command to do it?
Thanks! (13 Replies)
Discussion started by: maldini
13 Replies