Check if the command exists in bash I want to check if a given command exists in bash and I care only about the native commands of the bash and not the scripts written by the user. When I refer to native commands I mean all those commands that are generally available to a user.   There are two commands  command -v type   that can be used to check if the command exists. But it also returns a true for user written scripts whereas I want to restrict myself just to the inbuilt commands.  Note: I am not just trying to distinguish between a bash builtin and other commands because  type -t touch  gives file as the type, but this is a command available to the user by default. But if the user writes a script and then tries to run it then I would like to filter that.  Any help is appreciated.
Why not use "which"? What to use then? When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead?
Convert a Pair of Integers to a Integer, Optimally? Proof that the irrational numbers are uncountable I'm having a problem rendering the environment map. I downloaded a sample project that has the same settings as my project but it renders without a problem. I tried using both a .hdr and .png image. Attached are screenshots with node settings. First is the incorrect render and 2nd image is the project the renders correctly. How do I go about fixing this? Expected Value of Max of IID Variables What is the expected value of the maximum of 500 IID random variables   with uniform distribution between 0 and 1?   I'm not quite sure of the technique to go about solving something like this. Could anyone point me the right direction?  Thanks Why does Unix store timestamps in a signed integer? Why is a signed integer used to represent timestamps? There is a clearly defined start at 1970 that's represented as 0, so why would we need numbers before that? Are negative timestamps used anywhere? How to identify whether a file is normal file or directory Are all simple left modules over a simple left artinian ring isomorphic? Why is the nucleus of an Iron atom so stable? Lighter nuclei liberate energy when undergoing fusion, heavier nuclei when undergoing fission.  What is it about the nucleus of an Iron atom that makes it so stable?  Alternatively: Iron has the greatest nuclear binding energy - but why? How do I format a Microsoft JSON date? I'm taking my first crack at  with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:  /Date(1224043200000)/   From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success.  FYI: Here's the solution I came up with using a combination of the answers here:  function getMismatch(id) {   $.getJSON("Main.aspx?Callback=GetMismatch",     { MismatchId: id },      function (result) {       $("#AuthMerchId").text(result.AuthorizationMerchantId);       $("#SttlMerchId").text(result.SettlementMerchantId);       $("#CreateDate").text(formatJSONDate(Date(result.AppendDts)));       $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts)));       $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts)));       $("#LastUpdatedBy").text(result.LastUpdateNt);       $("#ProcessIn").text(result.ProcessIn);     }   );    return false; }  function formatJSONDate(jsonDate) {   var newDate = dateFormat(jsonDate, "mm/dd/yyyy");   return newDate; }   This solution got my object from the callback method and displayed the dates on the page properly using the date format library. How can I make a gameObject "stick" to another gameObject after it has collided with it? How can I make a gameObject "stick" to another gameObject after it has collided with it? Right now the gameObject just passes through! [C#] How to automatically fetch missing dependencies when installing software from .deb? Full file date (without GNU utilities) I am trying to obtain the full date (created or modified) of a particular file for passing to another program. I have tried variations of options with the ls command but none provide a full date for files less than 6 months old and I have limit usage of the options. When I try certain options I have seen trying to research this I get the following message:  usage: ls [-1ACFHLNRabcdefgilmnopqrstuxEUX] [File...]   None of which seems to provide what I needs as far as I can tell so I tried to use the stat command but it is not available to me.  I am using the Korn shell on AIX 5.3 which has limited commands available, can anyone suggest another way that I might be able to obtain a file's created or modified date as a full date (either dd/mm/yyyy or yyyy/mm/dd). In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory, and how do directory permissions in Linux work? Evaluate the integral $\int e^{-x}x^n dx$ Evaluating the integral $\int_{0}^{\infty}  e^{-x}x^n dx$ where n=0,1,2 ...   1st Integration by part: let $a=x^n$, $da= nx^{n-1} dx$, Also $db=e^{-x}$, $b=-e^{-x}$ We have $$ -x^n e^{-x} + n\int x^{n-1}e^{-x} dx$$  2nd: let $a=x^{n-1}, da= (n-1)x^{n-2}, db= e^{-x}, b= -e^{-x}$ We have $$-x^n e^{-x} + n\left[x^{n-1}(-e^{-x}) - \int(n-1)x^{n-2}\cdot -e^{-x}\right]$$  How would you find the general form? What would it be? Going back twice required to return to search results in the tags view javax.persistence.PersistenceException : [PersistenceUnit: vodPersistenceUnit] class or package not found Can I use my Windows 7 license in a dual-boot configuration? In setting up dual Boot with Windows and Ubuntu, which OS do I install first? I'd like to install both Ubuntu 12.04 and Windows XP on a Dell laptop, and I was thinking about using a dual boot structure, and using the bulk of my hard drive as empty hard drive space to share files between the two operating systems (so choice of file system type is very important in this set-up).     The kind of partitioning structure I would like to use is  Partition 1 - Ubuntu 12.04 (root) (20GB)  Partition 2 - Ubuntu /home        (20GB)  Partition 3 : Free Space          (560GB)  Partition 4 : Windows XP          (35GB)  Partition 5 : SWAP                (3GB)  (Total Hardrive Capacity is ~640GB)    My question is; what is the best way to go about setting up this kind this system?   Should I install Windows XP first and setup the partitions, and then install Ubuntu which I believe will install the GRUB bootloader for OS booting choice   or   Do I install Ubuntu first, setting up the available partitions and then perform a WIndows install?  Please let me know if there is anything in this setup that I have left out and should know about, including things related to setting particular partitions as logical or primary, and whether the boot partition and the filesystem partition should actually be two separate partitions. Putting a table next to a figure Will upgrading Windows 8 to 8.1 affect Ubuntu? It's a rather simple question (I hope). I currently have Windows 8 and I am dual booting it with Ubuntu 13.04.   If I were to install the latest update for Windows 8, that being 8.1, will it affect Ubuntu or will there be any conflicts between the two?