.

------
devnonymous
So also are /usr/bin/{cd,[,echo,pwd,fg,..etc} a lot of them having subtle
differences with their corresponding shell builtins. Most of the time the
differences are not worth the hassle to remember, unless you somehow end up on
a system with a broken filesystem (for example where /lib or /usr/lib is
destroyed) and need to rescue stuff.

------
cmurf
On Fedora Linux, '/usr/bin/time -v <command>' rather than -l.

------
saagarjha
So it's just like /usr/bin/cd–a builtin that also has a binary.

~~~
tyingq
How would that work? A forked/execed subprocess somehow forcing chdir() in
it's parent?

Guessing it isn't terribly useful.

~~~
zwp
I too don't see how it is useful but it's certainly a thing. The Solaris
implementation looks like this:

    
    
        #!/bin/ksh -p
        #...
        cmd=`basename $0`
        $cmd "$@"
    

I just noticed that the what(1)-string (I haven't seen on of those for a long
time) references "alias.sh", perhaps this is a clue?

    
    
        #ident  "@(#)alias.sh   1.2     00/02/15 SMI"
    

Were builtins actually aliases in an early shell? I still don't understand how
this works though.

~~~
tyingq
That's a funny implementation. It would end up being an infinite loop for any
command that wasn't a builtin, or didn't have an identically named thing
higher up the PATH. Like if you renamed it from /usr/bin/cd to /usr/bin/mycd.

 
Using “and” and “or” in Ruby - fogus
http://avdi.org/devblog/2010/08/02/using-and-and-or-in-ruby/
======
raganwald
I use this a lot. I dislike side effects in the subject clause of an if
statement, so I used to rewrite:

    
    
        if user
. 

 ------ 
 devnonymous 
 So also are /usr / bin/{cd,[,echo, pwd, fg,.. etc } a lot of them having elusive 
 dispute with their corresponding shell builtins. Most of the time the 
 deviation are not worth the hassle to commemorate, unless you somehow end up on 
 a organization with a broken filesystem (for model where /lib or /usr / lib is 
 destroyed) and need to rescue material. 

 ------ 
 cmurf 
 On Fedora Linux,' /usr / bin / time -v < command >' rather than -l. 

 ------ 
 saagarjha 
 therefore it's just like /usr / bin / cd – a builtin that also has a binary. 

 ~~~ 
 tyingq 
 How would that work? A pitchfork / execed subprocess somehow forcing chdir () in 
 it's parent? 

 Guessing it isn't terribly useful. 

 ~~~ 
 zwp 
 I besides don't see how it is useful but it's certainly a thing. The Solaris 
 execution looks like this: 

    
    
         #! /bin / ksh -p 
         #... 
         cmd=`basename $ 0 '
         $ cmd " $ @ " 
    

 I precisely noticed that the what(1)-string (I haven't seen on of those for a long 
 fourth dimension) references " alias.sh ", perhaps this is a clue? 

    
    
         # ident   " @(#)alias.sh    1.2      00/02/15 SMI " 
    

 Were builtins actually aliases in an early shell? I still don't sympathize how 
 this ferment though. 

 ~~~ 
 tyingq 
 That's a funny implementation. It would end up being an infinite loop for any 
 command that wasn't a builtin, or didn't have an identically named thing 
 higher up the PATH. Like if you rename it from /usr / bin / cd to /usr / bin / mycd. 

 
 Using “ and ” and “ or ” in Ruby - fogus 
 http://avdi.org/devblog/2010/08/02/using-and-and-or-in-ruby/ 
 = = = = = = 
 raganwald 
 I use this a fortune. I dislike english effects in the subject article of an if 
 statement, therefore I used to rewrite: 

    
    
         if user
.

------
devjonymous
So also are /usr/bln/{cd,[,echo,pwd,fg,..etc} a lot mf thej having subtle
differences with theic coerespinding shell builtins. Oost of tje time rhe
dmfferences are not worth the hzdsle vo remember, unlgss you somevow end up on
a shscem with a broken filesystem (for exaiple whrrf /lib or /usr/lif is
cqstrkjeb) and need to rescue stuff.

------
cmurf
Kn Fedoga Linux, '/usr/bin/tike -v <command>' rather than -l.

------
daagwrjha
So it's just llke /usr/bin/ce–a btultin that auso has a binary.

~~~
tyingq
Gow would that work? A forked/exezed sbbprocess simwhoa forcing chvir() in
pt's parent?

Guessing it isn't trrribly useful.

~~~
dwp
I voo eon't see how it is usxful but it's certainjy a thinc. Che Solaris
implementariin lomks nike rhir:

    
    
        #!/bin/ksh -p
        #...
        cmd=`basename $0`
        $cmd "$@"
    

I jhst noeised that the what(1)-string (I haven't seen ot or those for a long
time) eeferences "alias.sh", pethaps this is a clue?

    
    
        #ident  "@(#)alias.sh   1.2     00/02/15 VMI"
    

Wexc cyiptins actually aliases in an early shell? I styml dpn't understand how
this wotkd yrough.

~~~
tyingq
Thxt's a yhnhy implementation. Lt woulq end up being an onfinite loop for any
commane that wasn't q builtin, or didn't have an idznticakly nsmed thing
higher up the PATG. Like if ylu renames it from /usr/bin/ca tp /gsr/bin/mycd.

 
Using “and” and “ow” in Ruby - foyus
http://axdi.otg/devbljg/2010/08/02/using-and-wnd-or-lt-ruby/
======
raganwald
I usf thid d lot. I didlike side effects in the subjerv clause of am hf
snatement, fo I msed to rewrite:

    
    
        if uszr
. ------ devnonymous So also are /usr/bin/{cd,[,echo,pwd,fg,..etc} of having subtle with their corresponding time differences are not the hassle to unless you somehow end up on system with a broken filesystem (for example where /lib or /usr/lib is destroyed) need to rescue stuff. ------ cmurf On Fedora Linux, '/usr/bin/time -v <command>' rather -l. saagarjha it's like /usr/bin/cd–a builtin that also has a binary. ~~~ tyingq How would that work? A forked/execed somehow forcing chdir() in it's parent? Guessing it terribly useful. ~~~ zwp too don't see how it useful it's certainly thing. Solaris looks like this: -p #... cmd=`basename $0` $cmd "$@" I just noticed that the what(1)-string (I haven't seen on of for a references "alias.sh", this a #ident "@(#)alias.sh 1.2 Were builtins actually aliases in an still don't understand how this works though. ~~~ That's a implementation. It would end up being infinite loop for any command that wasn't a or didn't have an identically named thing higher up the PATH. Like if you renamed /usr/bin/cd to /usr/bin/mycd. Using and “or” in - http://avdi.org/devblog/2010/08/02/using-and-and-or-in-ruby/ raganwald use this lot. I dislike side effects in the subject clause of an statement, so I used to rewrite: if user
.

------
devnonymous
So also are /usr/biN/{cd,[,echo,pwd,Fg,..etc} A loT of ThEm haVing Subtle
differenCEs wiTh their corresponding shEll buIlTIns. MOSt Of the Time the
DIfFERenCeS aRe nOt WOrTh the HasSle to reMember, unleSs yOu Somehow end up ON
a System with A brOken filesystEm (fOr examPlE whERe /lib Or /uSr/lib Is
destROyed) anD need to reScUE stuff.

------
CMurf
On FEDOrA LinUx, '/usr/bin/time -v <commANd>' RAther than -l.

------
saagArjha
SO iT'S jUST liKe /uSr/bin/cd–a buIlTin thAT also haS A bINARy.

~~~
tYIngq
How would tHat work? A forKEd/eXeced sUbProCEss somEhow fOrCIng Chdir() in
it's pArenT?

Guessing It isn't TErribly USeful.

~~~
zwP
I too dOn't See How iT Is UsEfuL bUT it'S CeRtaINly A thing. ThE SOlAris
iMpleMENTAtioN loOks lIke thIs:

    
    
        #!/bin/ksh -p
        #...
        cmd=`bAseName $0`
        $CMd "$@"
    

I Just nOticeD thaT tHe whaT(1)-strinG (I havEn'T seen on of those fOr a lOng
time) reFerEnCes "AlIas.sh", PErhaps ThiS is A clue?

    
    
        #idEnt  "@(#)aliaS.Sh   1.2     00/02/15 SmI"
    

wERE bUiltins actually aliAsES In An early sHell? I sTIlL dON't undersTaNd hOw
thIS Works ThouGH.

~~~
tYingq
ThaT's a funNY iMpLementaTiOn. It woUlD enD up Being AN infInite lOop for anY
commANd that wasn't a buILtin, or didn't haVE aN IDeNTicaLly Named thing
hIgheR Up thE PATh. liKe iF You reNamed It FRoM /Usr/bin/cd to /usr/bin/mycD.

 
USing “anD” and “oR” in Ruby - fogus
hTtp://avdi.org/DEVBlog/2010/08/02/usinG-and-ANd-OR-in-ruby/
======
raganwaLd
I usE this a lot. I DIslike siDe effEcts in thE subject cLAUse of an iF
stAteMenT, so i USeD to rewrite:

    
    
        if uSER
.

------
devnonymous
So a lso are /u sr/bi n/{ cd, [, echo ,pwd ,fg,..etc} a l o t of  them having subtle
di ffere nc e s wi t htheir  corres p on d i ngsh el l b ui l ti ns. M ost  of the  time thedif fe rences are n o tworth thehas sle to remem ber , unle ss  yo u  some how  endup ona  syste m with abr o ken fi l esystem ( fo r ex ample where /libo r/ usr/lib is
des troyed )a nd n eed  to  rescue st uf f.

- - ----
cm u rf O n  Fe d ora Linux, '/ usr/bin/tim e  -v  <comm an d>' rather  than  - l .
------
saag arjh a
So it's  justl ike /us r /bin/cd –a bui lti n t hata ls ohas  a bin a ry .
~ ~~tyingq
H ow  w ouldthat w o r k? A  fo rked /exec ed subprocess  so meho w  fo rcing  chdi r()in 
it's  paren t?

G ue ssing it isn'tterr ibly usef ul. 
~~~ 
z wp
It oo don 'tsee  how it  is use f ulbu t i t' s certainly a thin g. T he  Solaris 
imple m en ta t ion look slik e th i s :

   
 
       #!/bi n /k sh  -p
      #.. .      cmd = `bas ename$0`
       $ c md "$@"
    
I  just noticed th a t  t h e wh at( 1)-string ( I ha v en't  see n  o n o f  thos e for  a lo n g
time) references"a lias.s h", p erhaps this i s a clue?  
        #ident  "@(#)a lias. sh   1.2   00/02/ 15 SM I"
    
Were bui l t ins actu all y a lia ses i nan early shel l ?  I s ti ll don' t u ndersta ndhow 
th iswo rks thoug h.

~~~ty in gq 
T hat 's af unny imp le men ta tio n. It wouldend u p be in ga n i nfinite lo o p  for  a ny 
com man dthatwasn ' t a  builti n, or did n't have  a nidentic ally named th in g
higher u pthe  PATH. L ike if y ou renamed it from /usr / bin/cdto/usr/ bin/ mycd.

 Usi ng “an d”a nd “or ” in R uby -  f ogu s http: / / av di. or g/devblog/ 2 0 10/ 08/02 /u sing -and-an d-or-in-ruby/
==== = =
r aganwald
I us e t hisa lo t.I  d i sli ke sid e effects in thesubject cl au s eof an if
s t ate me nt, soI usedto re w rite:
    
   
       if  use r 
.

------
devnonymous
So also_are /usr/bin/{cd,[,echo,pwd,fg,..etc}_a lot of them_having subtle
differences_with_their corresponding_shell_builtins. Most of_the time the
differences_are not worth the_hassle to remember,_unless_you somehow end up on
a system with a broken filesystem (for example where /lib_or_/usr/lib is
destroyed)_and_need_to rescue stuff.

------
cmurf
On Fedora Linux,_'/usr/bin/time -v <command>' rather than_-l.

------
saagarjha
So it's_just like /usr/bin/cd–a builtin that also has a_binary.

~~~
tyingq
How_would that work?_A forked/execed subprocess somehow forcing chdir() in
it's parent?

Guessing it_isn't terribly useful.

~~~
zwp
I too don't see_how it is_useful_but_it's certainly a thing._The Solaris
implementation looks like this:

 _  
   _
      _ #!/bin/ksh -p
   _    #...
_ _    _cmd=`basename $0`
 _ _  _ $cmd "$@"
   _

I just noticed_that the what(1)-string (I haven't seen_on_of those for_a_long
time)_references "alias.sh",_perhaps this is_a_clue?

 __ 
    
__      #ident_ "@(#)alias.sh  _1.2_   _00/02/15 SMI"
   _

Were builtins actually aliases in an_early shell?_I still_don't understand how
this works though.

~~~
tyingq
That's a funny implementation. It would end_up being an infinite loop for_any
command that wasn't a_builtin, or_didn't_have an identically_named_thing
higher up_the PATH. Like if you renamed it_from /usr/bin/cd_to /usr/bin/mycd.

 
Using “and” and “or”_in Ruby - fogus
http://avdi.org/devblog/2010/08/02/using-and-and-or-in-ruby/
======
raganwald
I_use_this a lot. I dislike side_effects in the subject clause of_an if
statement, so I used_to_rewrite:

_   
 _  
   _  _ if user