Sometimes (or may be all the time) an Alias and Function for a command works the same way. For example, following Alias and Function of Ping Command:  alias Pingoogle='ping -c 3 google.com &amp;&amp; echo "internet working..."' Pingoogle() {ping -c 3 google.com &amp;&amp; echo "internet working...";}   works the same way by producing same output. But, My question is that in this situation which is more proper (or professional)? Setting Alias for such commands or Using Functions?
It's taken me almost 10 years of Linux usage to ask this question. It was all trial and error and random late-night internet surfing.  But people shouldn't need 10 years for this. If I were just starting out with Linux, I'd want to know: When to alias, when to script, and when to write a function?  Where aliases are concerned, I use aliases for very simple operations that don't take arguments.   alias houston='cd /home/username/.scripts/'   That seems obvious. But some people do this:  alias command="bash bashscriptname"   (and add it to the .bashrc file)   Is there a good reason to do that? I'm trying really hard, but I genuinely can't think of any circumstances in which I'd want to do that. So, if there is an edge case where that would make a difference, please answer below.  Because that's where I would just put something in my PATH and chmod +x it, which is another thing that came after years of Linux trial-and-error.  Which brings me to the next topic. For instance, I added a hidden folder (.scripts/) in the home directory to my PATH by just adding a line to my .bashrc (PATH=$PATH:/home/username/.scripts/), so anything executable in there automagically autocompletes.  If I needed to.  I don't really need that, though, do I? I would only use that for languages that are not the shell, like Python.  If it's the shell, I can just write a function inside the very same .bashrc:  funcname () {   somecommand -someARGS "$@" }   As I stated, I found a lot of this out through trial and error. And I only truly saw the beauty of functions when my computer died and I was forced to use the computers of the people around me when they weren't using them.   Instead of moving a whole directory of scripts from computer to computer, I ended up just replacing everyone else's .bashrc with my own, since they had never even made a single modification.  But did I miss anything?   So, what would you tell a beginning Linux user about when to alias, when to script, and when to write a function?   If it's not obvious, I'm assuming the people who answer this will make use of all three options. If you only use aliases, or only use scripts, or only use functions—or if you only use aliases and scripts or aliases and functions or scripts and functions—this question isn't really aimed at you.
Change style properties of several layers simultaneously? Algebra - Solving for three unknowns. Find all possible solutions of $$2^x + 3^y = z^2.$$    My approach.   First I substituted $x = 0$, and got the solution, then for $y = 0$. And for $x &gt;  0$ and $y &gt; 0$ , I just know the Pythagorean triple and got the solution as $(4,2,5)$ and $(4,2,-5)$. Please help me to solve it properly. Black screen after installation of Ubuntu 18.04 I did a fresh complete install of Ubuntu 18.04 on my ASUS M32CD desktop.   Everything during install went fine. At the end it said it was complete complete, and would reboot. Popped the disc out. Rebooted itself back into bios so I changed it back from CD boot as primary to HD.  When it booted up for Ubuntu screen and then everything went black and can’t do anything now! Ugh. Help I'm examining a part of my dataset containing 46840 double values ranging from 1 to 1690 grouped in two groups. In order to analyze the differences between these groups I started by examining the distribution of the values in order to pick the right test.  Following a guide on testing for normality, I did a qqplot, histogram &amp; boxplot.       This doesn't seem to be a normal distribution. Since the guide states somewhat correctly that a purely graphical examination isn't sufficient I also want to test the distribution for normality.   Considering the size of the dataset and the limitation of the shapiro-wilks test in R , how should the given distribution be tested for normality and considering the size of the dataset, is this even reliable? ()  Edit:  The limitation of the Shapiro-Wilk test I'm referring to is that the dataset to be tested is limited to 5000 points.  To cite  concerning this topic:     An additional issue with the Shapiro-Wilk's test is that when you feed   it more data, the chances of the null hypothesis being rejected   becomes larger. So what happens is that for large amounts of data even   very small deviations from normality can be detected, leading to   rejection of the null hypothesis event hough for practical purposes   the data is more than normal enough.      [...] Luckily shapiro.test protects the user from the above described   effect by limiting the data size to 5000.   As to why I am testing for normal distribution in the first place:  Some hypothesis tests assume normal distribution of the data. I want to know whether or not I can use these tests. It looks like we'll be adding  support to Stack Overflow. This is necessary to prevent bots, spammers, and other malicious scripted activity. We only want human beings to post or edit things here!  We'll be using a JavaScript (jQuery) CAPTCHA as a first line of defense:    The advantage of this approach is that, for most people, the CAPTCHA won't ever be visible!  However, for people with JavaScript disabled, we still need a fallback and this is where it gets tricky.  I have written a  which we can re-use.    However, I'd prefer to go with something textual to avoid the overhead of creating all these images on the server with each request.  I've seen things like..   ASCII text captcha: \/\/(_)\/\/ math puzzles: what is 7 minus 3 times 2? trivia questions: what tastes better, a toad or a popsicle?   Maybe I'm just tilting at windmills here, but I'd like to have a less resource intensive, non-image based &lt;noscript&gt; compatible CAPTCHA if possible.  Ideas? Use chown to set the ownership of all a folder's subfolders and files? I wanted to tidy up a TeX document and was curious if you can use \lstinputlisting or a similar function to include a certain part of a source-code file.  Example, I have a 500 or so line source file and I want to include just lines 300-400.  Is there a way to do this? How do I find out which folder an app is in in iOS 11? In older versions of iOS, if I searched for an app with Spotlight, it would tell me which folder the app was in. (E.g., this feature still works on my iPad, which is running iOS 9, but not on my iPod Touch, which is running iOS 11.)  This feature seems to have been removed at some point. When I search for an app under iOS 11 using Spotlight, it will find the app and let me run it, but it doesn't tell me which folder it is in.  How can I find out which folder an app is in now? Are PPAs safe to add to my system and what are some "red flags" to watch out for? I see a lot of interesting programs out there that can only be obtained by adding a "PPA" to the system but, if I'm understanding correctly, we should stay within the official "repositories" for adding software to our system.   Is there any way for a novice to know if a "PPA" is safe or if it should be avoided? What tips should the user know about when dealing with a PPA?. I would like to know if the same Minecraft account used on a computer can be used on a different platform like the Xbox 360? I am not asking about playing on each simultaneously as each platform has been purchased - I am asking if you can cross play on multiple platforms with the same account. Basically I would like to know if all the saved stuff and settings from one platform will carry over to another. Keep sharp edges when using subdivision surface How can I use the subdivision surface modifier to create more high poly meshes without ruining sharp edges? For example this mesh  The sphere should be subdivided but the rim of the cylinder should stay the same because it is a sharp edge. This is the result of the subdevision  How can I get sharp edges to not be affected by the sub surf mod? ubi-partman failed with exit code 10 - ubuntu 18.04 I'm trying to install Ubuntu 18.04 on my laptop. After choosing the partitionn i have the following error message: grub-efi-amd64-signed package failed to install into / target/.    Then I tried to install via "try ubuntu" and i get:  ubi-partman failed with exit code 10     What should I do? My laptop is filled with viruses and Windows XP is just becoming impossible to work with.   I've been interested in Ubuntu for a while, so, would I be able to use something like Debian to clear my HDD and OS and then install Ubuntu and start fresh? I am running k-fold cross validation on my training data, and then choosing the best set of hyper parameters, re-training on the training data and testing on a new (unseen) testing data. I am getting the following testing results (results on the unseen data):  R^2: 1.000 Adj R^2: 1.000 RMSE: 0.081 MSE: 0.007 MAE: 0.045 MAPE: 0.058   Can $R^2$ have a value of 1.00 but RMSE have a  value of 0.081? Doesn't an $R^2$ of value 1 indicate no errors at all? Calling a function in main Problems with \printbibliography I am writing my thesis and need to do this with apa citation style.  I used the following code in my main document:  \usepackage[backend=biber,style=apa,sorting=none,natbib=true]{biblatex} \addbibresource{library.bib}  \usepackage[autostyle=true]{csquotes}    and in the end of my main document..  \printbibliography[heading=bibintoc,[title={References}]   However I always get this error:     "Undefined control sequence.   \printbibliography[heading=bibintoc,[title={References}]"   Furthermore in my references table, I get (yearmonthday) instead of (2015)e.g. and the references are not alphabetically sorted. How to lazy load images in ListView in Android I know why questions, answers and some other aspects of the site are color-coded and what they mean but I can't find why badges are color-coded. I'll include a snapshot to show what I mean. How do I keep running a Service the whole time? Command-line mv exclusion list