1 |
On Mon, 14 Nov 2011 02:06:04 -0500, Philip Webb wrote: |
2 |
|
3 |
> To convert a UNIX date to a human-readable version the command is : |
4 |
> |
5 |
> 556: ~> date -d @1321251520 |
6 |
> Mon Nov 14 01:18:40 EST 2011 |
7 |
> |
8 |
> I would like to create a Bash alias or function to do this, |
9 |
> but can't get the Bash syntax right: it keeps telling me |
10 |
> "date: the argument `1321251520' lacks a leading `+'; |
11 |
> when using an option to specify date(s), any non-option |
12 |
> argument must be a format string beginning with `+' |
13 |
> Try `date --help' for more information". |
14 |
|
15 |
It is difficult to say what is wrong with your alias as you haven't shown |
16 |
it, but my guess is that is is introducing a space between the @ and the |
17 |
timestamp, which gives exactly the error you get. |
18 |
|
19 |
|
20 |
-- |
21 |
Neil Bothwick |
22 |
|
23 |
When companies ship Styrofoam, what do they pack it in? |