Re: Date trouble
Re: Date trouble
- Subject: Re: Date trouble
- From: ishmael <email@hidden>
- Date: Mon, 23 Oct 2006 17:42:48 +0200
Thanks (also) for the minor disgression! it was useful, to me at
least...More or less on the same topic: you use %F instead of
%H:%M:%S, because is a "single-specifier shortcut"...what is a
single-specifier shortcut"? where can i find some documentation on
shell script, and this kind of things?
hope it's not OT...
cheers
Mauro
On 20/10/06, Mark J. Reed <email@hidden> wrote:
Minor digression on shell syntax; feel free to skip.
Those of you paying attention but not familiar with shellscripting
might have noticed that some of us have suggested { date +"%F %T" }
and others { date "+%F %T" } (note the different positions of the
opening quote). Those are exactly the same as far as the shell is
concerned; the quotes control the interpretation of what's between
them (e.g. preventing spaces from being treated as delimiters) but
don't act as delimiters themselves. So all of these, along with
various other permutations, are equivalent commands:
date "+%F %T"
date +"%F %T"
date +%F" "%T
date +%"F %"T
The only reason you need quotes at all is to prevent the space between
the F and the % from splitting the format string into two separate
arguments to the date command. You could accomplish the same thing by
quoting just the space with a backslash:
date +%F\ %T
You can also replace the double quotes with single quotes without
changing anything in this case, which as I said is my preference for
use from AppleScript "do shell script" since it avoids the need to
quote the quote.
I mention this only because it's somewhat different from the way most
other languages handle quoted strings, and can be confusing, even to
veteran shellscripters.
We now return you to your regularly-scheduled AppleScript discussion,
already in progress.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden