1 |
On Mon, 30 May 2011 18:00:02 +0200, Neil Bothwick wrote about Re: |
2 |
[gentoo-user] setting locale: |
3 |
|
4 |
>On Mon, 30 May 2011 15:43:19 +0100, David W Noon wrote: |
5 |
> |
6 |
>> Moreover, I never use file redirection from echo when a text editor |
7 |
>> is a more appropriate tool. What you have suggested above could well |
8 |
>> replace a valid locale setting with an that invalid one, without any |
9 |
>> checks at all on the existing contents of the file. So, it's best to |
10 |
>> use vim, nano or even emacs for such a job. |
11 |
> |
12 |
>Setting noclobber in /etc/profile.d/*shopts.sh avoids that particular |
13 |
>problem, as well was the one of accidentally nuking a file when you |
14 |
>meant to add to it with >>. |
15 |
|
16 |
Setting noclobber is fine for not obliterating the current contents of |
17 |
the file, but it does not help where the current contents need to be |
18 |
updated. That is why I *always* use a text editor to modify |
19 |
configuration files. |
20 |
-- |
21 |
Regards, |
22 |
|
23 |
Dave [RLU #314465] |
24 |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |
25 |
dwnoon@××××××××.com (David W Noon) |
26 |
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* |