DragonFly BSD
DragonFly users List (threaded) for 2012-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: /bin/ls vs .dotted files


From: "sad@xxxxxxxxx" <sad@xxxxxxxxx>
Date: Fri, 14 Sep 2012 13:49:31 +0400

Jan Lentfer пиÑ?еÑ?:
> On Fri, 14 Sep 2012 08:21:29 +0400, Andrey N. Oktyabrski wrote:
> [..]
>> There is one more solution which I have seen in Solaris. Many
>> commands are environment-sensitive.
>>
>> For example, we can have the CMD_BEHAVIOR environment variable, which
>> can have values "POSIX" (or "POSIX:1812.321"), "BSD", "LINUX",
>> "SOLARIS", ...
>> So we can use these conditions:
>> if $CMD_BEHAVIOR is unset or $CMD_BEHAVIOR == "" then CMD_BEHAVIOR=POSIX
>> if $CMD_BEHAVIOR == POSIX then f_listdot = 0
>> if $CMD_BEHAVIOR == BSD and UID == 0 then f_listdot = 1
>>
>> In this case I can change a command behavior in my shell scripts, and
>> my scripts can be OS-independent.
>
> How would that be OS-independent if only implemented on Solaris and its
> derivatives? ;) That's like saying JAVA is a highly portable language :P

he means OS-independent scripts (scripts that a user writes for his own 
purpose). the proposed approach makes it more possible for a user to 
write such a script indeed.

though, not without limitations while only Solaris and Dragonfly 
implement it :)

and may be the most important point is:
this approach makes migration to Dragonfly easier.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]