I get the same results on a new system (CEntOS 5.6).<br><br>The comparison _should_ not "see" the \n<br><br><div class="gmail_quote">On Wed, Jul 20, 2011 at 11:45 AM, Charles Shapiro <span dir="ltr"><<a href="mailto:hooterpincher@gmail.com">hooterpincher@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Newline character?<br>
<br>
On a really old system I get:<br>
<br>
foo# date +%d | od -c<br>
0000000 2 0 \n<br>
0000003<br>
<br>
<br>
-- CHS<br>
<div><div></div><div class="h5"><br>
On Wed, Jul 20, 2011 at 11:41 AM, Robert L. Harris<br>
<<a href="mailto:robert.l.harris@gmail.com">robert.l.harris@gmail.com</a>> wrote:<br>
><br>
> -----BEGIN PGP SIGNED MESSAGE-----<br>
> Hash: SHA1<br>
><br>
><br>
> Ok, simple one... I have a script that has this:<br>
><br>
><br>
> #!/bin/bash<br>
><br>
> date=`date +%d`<br>
> if [ $date = "01" ]; then<br>
> # Run Monthly Backup<br>
> else<br>
> # Run Incremental Backup<br>
> fi<br>
><br>
> - From the man page of 'date':<br>
> %d day of month (e.g, 01)<br>
><br>
> And when I set it up last year, it did run a full on 11/01/2010. But<br>
> now it's not. Going to convert it to a numerical '-eq' comparison but<br>
> it's still got me wondering why it's picking the wrong date. Any ideas?<br>
><br>
> Robert<br>
><br>
> - --<br>
><br>
> :wq!<br>
> ====================================================================<br>
> Robert L. Harris | GPG Key ID: E344DA3B<br>
> @ x-hkp://<a href="http://pgp.mit.edu" target="_blank">pgp.mit.edu</a><br>
> DISCLAIMER:<br>
> These are MY OPINIONS With Dreams To Be A King,<br>
> ALONE. I speak for First One Should Be A Man<br>
> no-one else. - Manowar<br>
><br>
> -----BEGIN PGP SIGNATURE-----<br>
> Version: GnuPG v1.4.11 (GNU/Linux)<br>
><br>
> iEYEARECAAYFAk4m9x8ACgkQ8+1vMONE2jvuSgCgmi/771au8rOxhSLm0iwfuJ4x<br>
> aV8AnjfTb/21A/w4PBUfCnZ1G7CcPKxl<br>
> =UYaq<br>
> -----END PGP SIGNATURE-----<br>
><br>
> _______________________________________________<br>
> Ale mailing list<br>
> <a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
> <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
> See JOBS, ANNOUNCE and SCHOOLS lists at<br>
> <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
><br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br><br>As long as the general population is passive, apathetic, diverted to
consumerism or hatred of the vulnerable, then the powerful can do as
they please, and those who survive will be left to contemplate the
outcome.<br>- <i><i><i><i>2011 Noam Chomsky<br><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i><br>