Skip to main content
8 events
when toggle format what by license comment
Apr 17, 2011 at 5:33 history edited Caleb CC BY-SA 3.0
added 127 characters in body
Apr 16, 2011 at 23:01 comment added user unknown I can't upvote this, until which is replaced by type. I used which, over and over again, not knowing of type and was very astonished to lern, that which is only right, if deciding between programs.
Apr 16, 2011 at 21:59 comment added Peter.O type which which is /usr/bin/which .. which which which is hashed (/usr/bin/which)` .. type type type is a shell builtin .. I'm not sure what that last one means, but it looks interesting :) .. which type returned nothing..
Apr 16, 2011 at 19:35 comment added Random832 Many systems ship with an alias of which to type or some set of options e.g. alias which='type -path' - this could be the source of confusion.
Apr 16, 2011 at 17:34 comment added cjm which is not necessarily a built-in command, and if it's not, it won't know about the shell's built-ins. POSIX requires that type be a built-in command, so it always knows about built-ins.
Apr 16, 2011 at 16:53 comment added Caleb "System procses" just means it is being started up as an independent application managed by the kernel. The alternative in the case of builtins is just running a sub-function in the already running code of your shell. In the example you give, type is the better indicator of what is being run, but you notice echo is both a builtin and there is an application with that name. If your shell didn't have a builtin the system one would get run.
Apr 16, 2011 at 16:44 comment added Peter.O @Caleb: thanks for your comment, but it leaves me wondering about what exactly a "system process" is.. I keep seeing references to then but I don't understand whwere the distinction lies.... (btw I can't see how 'which' is an absolute indicator).. eg..'which echo=>"/bin/echo" and type echo=>"echo is a shell builtin", but 'which dd=>"/bin/dd" and type dd=>"dd is /bin/dd" ... so, I'm part way there ....
Apr 16, 2011 at 16:02 history answered Caleb CC BY-SA 3.0