From mboxrd@z Thu Jan 1 00:00:00 1970 From: schily@schily.net (Joerg Schilling) Date: Sat, 10 Sep 2016 11:41:06 +0200 Subject: [TUHS] Shell control through external commands In-Reply-To: <20160910091307.GE14636@yeono.kjorling.se> References: <1468585644.26769.for-standards-violators@oclsc.org> <20160910074508.GE5970@dnied%tiscali.it> <20160910091307.GE14636@yeono.kjorling.se> Message-ID: <57d3d532.4U8eX8vgS2k6hIod%schily@schily.net> Michael Kjörling wrote: > On 10 Sep 2016 09:45 +0200, from dnied at tiscali.it (Dario Niedermann): > > Il 15/07/2016 alle 14:27, Norman Wilson ha scritto: > >> lu$ cat /bin/cd > >> #!/bin/sh > >> builtin cd "$@" > >> lu$ > > > > But doesn't this change the current dir only in the child shell? > > Which then exits right after the second line, parent shell's $PWD > > unaffected. I really don't see how this script is useful. > > It does appear rather useless. Curiously, Debian (checked on Wheezy = > bash 4.2+dfsg-0.1+deb7u3 and Jessie = bash 4.3-11+b1) seems to not > supply anything like that, so it would appear to be some kind of > Fedora-ism rather than a part of anything upstream; that, or the > Debian folks are actually paying attention to what they ship onto > users' systems. POSIX requires some commands to be callable via exec(). Jörg -- EMail:joerg at schily.net (home) Jörg Schilling D-13353 Berlin joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'