From: Seebs on
On 2010-02-14, Phred Phungus <Phred(a)example.invalid> wrote:
> oh balls. The more I talk about this, the more I think I should
> hardcode PATH_MAX at 4096.

You shouldn't. Learn to do things right -- it's worth it.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Phred Phungus on
Seebs wrote:
> On 2010-02-14, Phred Phungus <Phred(a)example.invalid> wrote:
>> oh balls. The more I talk about this, the more I think I should
>> hardcode PATH_MAX at 4096.
>
> You shouldn't. Learn to do things right -- it's worth it.
>
> -s

Then how does one determine PATH_MAX given a directory?
--
fred
From: Lew Pitcher on
On February 15, 2010 16:25, in comp.unix.shell, Phred(a)example.invalid wrote:

> Seebs wrote:
>> On 2010-02-14, Phred Phungus <Phred(a)example.invalid> wrote:
>>> oh balls. The more I talk about this, the more I think I should
>>> hardcode PATH_MAX at 4096.
>>
>> You shouldn't. Learn to do things right -- it's worth it.
>>
>> -s
>
> Then how does one determine PATH_MAX given a directory?

Geoff gave you the answer: use the getconf utility program.

getconf PATH_MAX $GivenDirectory

--
Lew Pitcher
Master Codewright & JOAT-in-training | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
---------- Slackware - Because I know what I'm doing. ------


From: Seebs on
On 2010-02-15, Phred Phungus <Phred(a)example.invalid> wrote:
> Then how does one determine PATH_MAX given a directory?

In comp.unix.shell, one doesn't -- the shell doesn't have to pre-allocate
storage for strings. If you want to know how to do it in C, try
comp.unix.programmer. :)

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Phred Phungus on
Lew Pitcher wrote:
> On February 15, 2010 16:25, in comp.unix.shell, Phred(a)example.invalid wrote:
>
>> Seebs wrote:
>>> On 2010-02-14, Phred Phungus <Phred(a)example.invalid> wrote:
>>>> oh balls. The more I talk about this, the more I think I should
>>>> hardcode PATH_MAX at 4096.
>>> You shouldn't. Learn to do things right -- it's worth it.
>>>
>>> -s
>> Then how does one determine PATH_MAX given a directory?
>
> Geoff gave you the answer: use the getconf utility program.
>
> getconf PATH_MAX $GivenDirectory
>

$ getconf PATH_MAX $/etc/
4096
$

I didn't guess wrong.
--
fred