On 14 November 2011, at 07:06, 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 keep
14 Willie Wong wrote:
> On Mon, Nov 14, 2011 at 06:13:34AM -0500, Philip Webb wrote:
>> alias th='date -d @$1'
> That is not how you use alias.
> What you want is to use a function. Replace the alias line by
> function th { date -d @$1; }
> in your bashrc you'l probably be ok.
That's wha
On Mon, 14 Nov 2011 06:13:34 -0500, Philip Webb wrote:
> > 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.
>
> > b
14 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
On Mon, Nov 14, 2011 at 06:13:34AM -0500, Philip Webb wrote:
> alias th='date -d @$1'
>
> was the first try, then adding '+' &/or '\' to escape '+' or '@'.
> I also tried a function along similar lines.
>
That is not how you use alias.
What you want is to use a function. Replace the alias li
On Mon, 14 Nov 2011 06:13:34 AM Philip Webb wrote:
> 14 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 wo
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:
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
8 matches
Mail list logo