• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] Shell scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Shell scripting


  • Subject: Re: [OT] Shell scripting
  • From: Walter Ian Kaye <email@hidden>
  • Date: Fri, 26 Dec 2003 20:44:27 -0800

At 03:22p -1000 12/26/2003, Reinhold Penner didst inscribe upon an electronic papyrus:

I was wondering if there is a shell way to apply the formatting to an arbitrary date string. For example get the creation/modification date of a file and format that as easily as below.

Not with `date`, but maybe some other program that calls strftime() would allow it. The hard part is discovering what program that might be.

-boo


On Dec 26, 2003, at 6:51, John W. Baxter wrote:

Change the echo command to something along these lines (watch line
wrapping):
echo "AppleFileServer restarted by autoAfpCheck at `date +%H:%M\ on\
%Y-%m-%d`"

Which gives
AppleFileServer restarted by autoAfpCheck at 08:46 on 2003-12-26

man strftime
will reveal the various codes you could use instead of what I used.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [OT] Shell scripting
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: [OT] Shell scripting (From: "John W. Baxter" <email@hidden>)
 >Re: [OT] Shell scripting (From: Reinhold Penner <email@hidden>)

  • Prev by Date: Re:New AppleScript book- why a dog
  • Next by Date: Re: Regarding Unknown elements in AS GUI
  • Previous by thread: Re: [OT] Shell scripting
  • Next by thread: Re: [OT] Shell scripting
  • Index(es):
    • Date
    • Thread