[blfs-support] Comment/Question/Flame on "probably the most used admin tool", 'find'

Dan McGhee beesnees at grm.net
Thu Nov 7 13:37:58 PST 2013


On 11/07/2013 03:02 PM, alex lupu wrote:
> <much snipping>
> A sample output:
>
> []% date
> Thu Nov  7 13:05:10 EST 2013
>
> <more snipping>
> Note:  the time change (DST to EST) was effected at 2AM, Nov. 3 here,
> whereby everybody had to move their clocks one hour back - like to 1AM.
>
When I got to the end of your post and you wondered about a "simple" 
<if> command, my mind went right back to these two statements. This is 
also just a "gut reaction" to your post and not thought out.  (I'm 
taking a break from trying to make my new LFS bootable in an efi 
environment.)

You could test $DATE to see if it's between Nov 3 01:59:59 and Mar 
<whatever> 01:59:59.  Let's say the start date is time1 and the end date 
time2 then you could say:

if $DATE >= time1 -a <= time2; then
tz=EST (or UTC-5)     #however you can write that to make bash understand
else
tz=EDT (or UTC-4)     #same caveat
fi

And then use $tz however you do in your wrapper.

Hopefully, this might lead you down a path to resolve your dilemma and 
stop global warming.

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-support/attachments/20131107/b2e4de12/attachment.html>


More information about the blfs-support mailing list