:: Re: [DNG] Quick start guide to upra…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Florian Zieboll
Date:  
À: dng
Sujet: Re: [DNG] Quick start guide to uprading to Devuan and configuring minimalism
On Tue, 12 Jan 2016 14:36:03 +0100
Svante Signell <svante.signell@???> wrote:

> On Tue, 2016-01-12 at 13:22 +0100, Florian Zieboll wrote:
> > On Tue, 12 Jan 2016 08:48:45 -0300
> > Renaud (Ron) OLGIATI <renaud@???> wrote:
> >
> [...]
> >
> >
> > Yes – if there's no "exit" command contained in the
> > existing .xinitrc.
>
> What about: (saves a copy of the old file):
>
> if [ -f test ]; then
>     mv test test.old
>     echo "new_entry" > test
> else
>     echo "new_entry" > test
> fi
>
> or:
>
> if [ -f test ]; then
>     mv test test.old
> fi
>     echo "new_entry" > test



For not having to mention the trigger words "text editor", I think the
easiest way to avoid frustrated beginners would be to add a warning like
the following to the guide:

"This command contains a redirection which will create the named file.
If that file already exists, its content will be overwritten and thus
should be edited manually instead!"

Florian