it is not applied the comment(#)for histsize

General support questions
Post Reply
violetish
Posts: 2
Joined: 2017/07/24 03:55:28

it is not applied the comment(#)for histsize

Post by violetish » 2017/07/24 04:03:38

I wanna disable the histsize at the /etc/profile .

so i enabled the comment line like:

#HISTSIZE=1000


i know that # tag is handling the comment line, so it is same as HISTSIZE=0. Isn't it?

only HISTSIZE=0 is applied the actually, #HISTSIZE=1000 is continuously worked.

why # is not activated? is there a default value existing the histsize?

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: it is not applied the comment(#)for histsize

Post by MartinR » 2017/07/24 13:32:24

Commenting out an assignment is not the same as setting it to zero. If you do

Code: Select all

$ x=40
$ echo $x
$ #x=99
$ echo $x
you would expect to see "40" on both occasions. Likewise if you simply comment out #HISTSIZE=1000 the default will apply, which for BASH 4.2 is 500.

violetish
Posts: 2
Joined: 2017/07/24 03:55:28

Re: it is not applied the comment(#)for histsize

Post by violetish » 2017/07/25 00:25:15

MartinR wrote:Commenting out an assignment is not the same as setting it to zero. If you do

Code: Select all

$ x=40
$ echo $x
$ #x=99
$ echo $x
you would expect to see "40" on both occasions. Likewise if you simply comment out #HISTSIZE=1000 the default will apply, which for BASH 4.2 is 500.

Thank you Martin. I understand it.

Post Reply