TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:7564] more bash
Nathan Van Eps wrote:
>
> if you get info back from a command, and want to string compare the
> >first 3 characters, don't tell me I have to go do this in Perl or
> >something, do you?
> >
> >day=`date`
> >if [ day = "Fri *" ]; then
> >.
> >.
> >.
> >
> >doesn't work, nor does defining a Fri_str to compare it to. I promise
> >I'll get the book, but if someone can 'splain this to me, my family can
> >have me back tonight...
>
> Try this:
<deleted>
Instead, try:
day=`date +%a`
-S