On 23/7/24 23:22, Keith Bainbridge wrote:
Another is to fetch the epoch time value (%s) and then use that value
in all future calls. With GNU date:
now=$(date +%s)
julian=$(date -d "@$now" +%j)
dom=$(date -d "@$now" +%d)
Good evening All - especially Greg
This process has work
On Wed, Jul 24, 2024 at 21:08:29 +1000, Keith Bainbridge wrote:
> So when I opened my xterm this morning, I saw:
> keith@lenv0
>
> Tue 23Jul2024@19:19:30 205.2024 AEST
> :~ $>
>
> You have new mail in /var/spool/mail/keith
>
>
> Pressed enter, and the day# updated:
>
> keith@lenv0
>
>
On 23/7/24 23:22, Keith Bainbridge wrote:
On 23 July 2024 9:42:27 pm AEST, Greg Wooledge wrote:
On Tue, Jul 23, 2024 at 18:02:53 +1000, Keith Bainbridge wrote:
From the tab I had used earlier, ran source .bashrc
then
:/tmp/205.2024 $>mkcd /tmp/day$DOYR.$YEAR
So you're setting
On Tue 23 Jul 2024 at 15:00:12 (-0400), Greg Wooledge wrote:
> On Tue, Jul 23, 2024 at 13:38:48 -0500, David Wright wrote:
> > On Tue 23 Jul 2024 at 09:31:36 (-0400), Greg Wooledge wrote:
> > > On Tue, Jul 23, 2024 at 23:22:52 +1000, Keith Bainbridge wrote:
> > > > The day# in my command prompt inc
On Tue, Jul 23, 2024 at 13:38:48 -0500, David Wright wrote:
> On Tue 23 Jul 2024 at 09:31:36 (-0400), Greg Wooledge wrote:
> > On Tue, Jul 23, 2024 at 23:22:52 +1000, Keith Bainbridge wrote:
> > > The day# in my command prompt increments when I start in the morning.
> > > Maybe I need to press ent
On Tue 23 Jul 2024 at 09:31:36 (-0400), Greg Wooledge wrote:
> On Tue, Jul 23, 2024 at 23:22:52 +1000, Keith Bainbridge wrote:
> > The day# in my command prompt increments when I start in the morning. Maybe
> > I need to press enter.
>
> That makes it sound like you're setting the YEAR et al. var
On Tue, Jul 23, 2024 at 23:22:52 +1000, Keith Bainbridge wrote:
> The day# in my command prompt increments when I start in the morning. Maybe I
> need to press enter.
That makes it sound like you're setting the YEAR et al. variables in the
PROMPT_COMMAND variable.
If that's the case, it's *less*
On 23 July 2024 9:42:27 pm AEST, Greg Wooledge wrote:
>On Tue, Jul 23, 2024 at 18:02:53 +1000, Keith Bainbridge wrote:
>> From the tab I had used earlier, ran source .bashrc
>>
>> then
>> :/tmp/205.2024 $>mkcd /tmp/day$DOYR.$YEAR
>
>So you're setting those variables one time inside you
On Tue, Jul 23, 2024 at 18:02:53 +1000, Keith Bainbridge wrote:
> From the tab I had used earlier, ran source .bashrc
>
> then
> :/tmp/205.2024 $>mkcd /tmp/day$DOYR.$YEAR
So you're setting those variables one time inside your .bashrc file?
This is quite bad. What happens when you have a
On Tue, Jul 23, 2024 at 17:02:08 +1000, Keith Bainbridge wrote:
> mkcd ()
> {
> mkdir -p $1
> cd $1
> }
You're missing quotes. Two sets. You probably also want && between
the two commands, to check for the success of the mkdir before attempting
a cd.
> in the form :~ $> mkcd
> /mn
10 matches
Mail list logo