111114 Neil Bothwick wrote:
> On Mon, 14 Nov 2011 02:06:04 -0500, Philip Webb wrote:
>> To convert a UNIX date to a human-readable version the command is :
>>   556: ~> date -d @1321251520
>>   Mon Nov 14 01:18:40 EST 2011
>> I would like to create a Bash alias or function to do this,
>> but can't get the Bash syntax right: it keeps telling me
>> "date: the argument `1321251520' lacks a leading `+';
> It is difficult to say what is wrong with your alias
> as you haven't shown it

  alias th='date -d @$1'

was the first try, then adding '+' &/or '\' to escape '+' or '@'.
I also tried a function along similar lines.

> but my guess is that is is introducing a space
> between @ and the timestamp, which gives exactly the error you get.

No, no spaces.

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatchassdotutorontodotca


Reply via email to