01-27-2011
I have also done
page which include two tools and also examples for date calculation:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hii all.
I have to get the date of the 7th day past from the current date.
if i give the current date as sep 3 then i must get the date as 27th of august.
can we get the values from the "cal" command.
cal | awk '{print $2}' will this type of command work.
actually my need is
if today is... (17 Replies)
Discussion started by: ladtony
17 Replies
2. Shell Programming and Scripting
Hi,
Anybody knows how to get what date was 28 days ago of the current system date through UNIX script.
Ex : - If today is 28th Mar 2010 then I have to delete the files which arrived on 1st Mar 2010, (15 Replies)
Discussion started by: kandi.reddy
15 Replies
3. Shell Programming and Scripting
Hello Experts,
How do i get date after 5 days from current date in YYYYMMDD format?
How do you compare date in YYYYMMDD format?
Thanks (8 Replies)
Discussion started by: needyourhelp10
8 Replies
4. Windows & DOS: Issues & Discussions
Hi,
I'm writing an batch file to create report
In the batch file iam passing two arguments:startdate and finishdate
Ex: startdate=07-sep-2009 finishdate=07-sep-2011
I need to have script that takes command line argument as input and gives me out currentdate last year and current date... (2 Replies)
Discussion started by: anand1773
2 Replies
5. Shell Programming and Scripting
I am trying to find out the number of days between the current date and user defined date.
I took reference from here for the date2jd() function.
Modified the function according to my requirement. But its not working properly.
Original code from here is working fine.
#!/bin/sh... (1 Reply)
Discussion started by: hiten.r.chauhan
1 Replies
6. Shell Programming and Scripting
Hi,
I want to subtract 'n' days from the current timestamp in a k shell script. Is there any inbuilt function to do it
or any workaround solution to get the date. And I want the output to be in YYYY:MM:DD HH:MM:SS format. Please help.
Thanks in advance. (4 Replies)
Discussion started by: Suryaaravindh
4 Replies
7. Shell Programming and Scripting
Well guys,
I know the right syntax for displaying the current date is $(date). However, I am planning to send emails to some customers which displays their subscription date, and then the expiry. The expiry being 30 days from the current date.
What would the right syntax be? (6 Replies)
Discussion started by: xxxx
6 Replies
8. Shell Programming and Scripting
hi all..
i want 2 know how 2 find 7days past date from current date..
when i used set datetime = `date '+%m%d%y'` i got 060613..
i just want to know hw to get 053013..
i tried using date functions but couldnt get it :( i use c shell and there is no chance that i can change that ..... (3 Replies)
Discussion started by: Rahul619
3 Replies
9. UNIX for Beginners Questions & Answers
I have to display only those subscribers which are in "unconnected state" and the date is 90 days older than today's date.
Below command is used for this purpose:
cat vfsubscriber_20170817.csv | sed -e 's/^"//' -e '1d' | nawk -F '",' '{if ( (substr($11,2,4) == 2017) && ( substr($11,2,8) -lt... (1 Reply)
Discussion started by: dia
1 Replies
10. HP-UX
current date command runs well
awk -v t="$(date +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
subtract 30 days fails
awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.dat
awk command in hp unix subtract 30 days automatically from current date without date illegal option error... (20 Replies)
Discussion started by: kmarcus
20 Replies
LEARN ABOUT CENTOS
rescan-scsi-bus.sh
RESCAN-SCSI-BUS.SH(1) User Commands RESCAN-SCSI-BUS.SH(1)
NAME
rescan-scsi-bus.sh - script for adding and removing SCSI devices without rebooting
SYNOPSIS
rescan-scsi-bus.sh [options] [host [host ...]]
OPTIONS
-a, --alltargets
scan all targets, not just currently existing [default: disabled]
-d enable debug [default: 0]
-l activates scanning for LUNs 0--7 [default: 0]
-L NUM activates scanning for LUNs 0--NUM [default: 0]
-w, --wide
scan for target device IDs 0--15 [default: 0--7]
-c enables scanning of channels 0 1 [default: 0 / all detected ones]
-r, --remove
enables removing of devices [default: disabled]
-f, --flush
flush failed multipath devices [default: disabled]
-i, --issue-lip
issue a FibreChannel LIP reset [default: disabled]
-u, --update
look for existing disks that have been remapped
-s, --resize
look for resized disks and reload associated multipath devices, if applicable
--forcerescan
rescan existing devices
--forceremove
remove and readd every device (DANGEROUS)
--nooptscan
don't stop looking for LUNs is 0 is not found
--color
use coloured prefixes OLD/NEW/DEL
--hosts=LIST
scan only host(s) in LIST
--channels=LIST
scan only channel(s) in LIST
--ids=LIST
scan only target ID(s) in LIST
--luns=LIST
scan only lun(s) in LIST
--sync, --nosync
issue a sync / no sync [default: sync if remove]
--attachpq3
tell kernel to attach sg to LUN 0 that reports PQ=3
--reportlun2
tell kernel to try REPORT_LUN even on SCSI2 devices
--largelun
tell kernel to support LUNs > 7 even on SCSI2 devs
--sparselun
tell kernel to support sparse LUN numbering
Host numbers may thus be specified either directly on cmd line (deprecated) or or with the --hosts=LIST parameter (recommended).
LIST: A[-B][,C[-D]]... is a comma separated list of single values and ranges (No spaces allowed.)
SEE ALSO
rescan-scsi-bus.sh Homepage: http://www.garloff.de/kurt/linux/#rescan-scsi
sg3_utils Homepage: http://sg.danny.cz/sg
rescan-scsi-bus.sh 1.57 leden 2014 RESCAN-SCSI-BUS.SH(1)