So I'm learning to use the CLI and I'm playing around with redirecting and piping and then I get different output from executing the same commands.   Basically I'm listing all executables from /bin/ and /usr/bin/ in a .txt file, and afterwards changing the same .txt file to only list the duplicate entries. First time I executed the 2 commands it didn't work, but the second time it worked. I repeated the 2 commands a couple of more times and sometimes it works, sometimes it doesn't. Here's a snippet from my terminal:  username@computer:~/playground$ ls /bin/ /usr/bin/ &gt; ls_bin_usr-bin.txt  username@computer:~/playground$ cat ls_bin_usr-bin.txt | sort | uniq -d | tee ls_bin_usr-bin.txt | wc -l 0 username@computer:~/playground$ ls /bin/ /usr/bin/ &gt; ls_bin_usr-bin.txt  username@computer:~/playground$ ls -l total 20 -rw-rw-r-- 1 username username 19816 Feb  9 17:27 ls_bin_usr-bin.txt username@computer:~/playground$ cat ls_bin_usr-bin.txt | sort | uniq -d | tee ls_bin_usr-bin.txt | wc -l 12 username@computer:~/playground$ ls -l total 4 -rw-rw-r-- 1 username username 92 Feb  9 17:27 ls_bin_usr-bin.txt   How come it doesn't behave in the same way every time?  I'm on Xubuntu 18.04 btw
I created the following script:  #!bin/bash cat &gt; Top10 &lt;&lt;EOF Linux Mint 17.2 Ubuntu 15.10 Debian GNU/Linux 8.2 Mageria 5 Fedora 23 openSUSE Leap 42.1 Arch Linux CentOS 7.2-1511 PCLinuxOS 2014.12 Slackware Linux 14.1 FreeBSD EOF sed -ri "s/^[^0-9]*$//" Top10 sed -r "s/(.*)([[:space:]][[:digit:]]*.*)$/\2\1/" Top10 | sed -r "s/([[:space:]])([[:digit:]])/\2/" | sed -r "s/([[:digit:]])([[:alpha:]])/\1 \2/" &gt; Top10 sed -r -i "s/(.*)/\L\1/" Top10 sed -r -i "y/[aeiou]/[AEIOU]/" Top10 sort Top10 -g -o Top10 cat Top10   When I run it a few times the following happens:     As you can see sometimes the Top10 file turns out empty and sometimes it turn out the way I needed it to be. I know that the command which replaces the extensions from the end to the front of a line is done poorly. I ran this script on a VMware virtual machine. Could that be the reason?
Would "mid-to-late" and "low-to-mid" hyphenated as compound modifiers? Would "mid-to-late" and "low-to-mid" be hyphenated as compound modifiers?  Examples:  Temperatures are expected to be in the low-to-mid 60s.  Joe, I think, is in his mid-to-late 80s.  He was in his middle-to-late 40s.  She was in her middle-to-upper 60s.  Temperatures are expected to be in the lower-to-middle 70s.  Are all correct?  Thanks!!! All  I just install a fresh new Ubuntu 16.04 on my new desktop which has a 8th generation Intel CPU i5 8600K. When OS installed, I found there is only one option in display setting: 1024 x 768 (4:3),  My monitor is a HDMI monitor with 1920x1080 resolution  Do anyone have any idea how to make the resolution setting right? Thanks.  BTW. I do not install any graphic card, I use the internal GPU of Intel How do I pre-populate a jQuery Datepicker textbox with today's date? How can I completely remove all traces of Java on my system?   I already know  in case I need it again. Which of those functions are PRFs? Some irreducible character separates elements in different conjugacy classes Let $x$ and $y$ be elements that are not conjugate in $G$.  Then there is some irreducible character $\chi$ such that $\chi(x) \not = \chi(y)$.   Clearly the "irreducible" part isn't important, since any character can be written as the sum of irreducible characters, but I'm having trouble going beyond that.  I'd appreciate a good hint over a full answer, and I'd be most interested in a way to construct a group representation $\varphi:G \to GL(V)$ of $G$ such that the character of the representation takes different values on $x$ and $y$. How to choose a circle for default stream in Google Plus? How can I choose a specific circle for the default stream in Google+ ? Many extensions don't work, and are not comfortable if using another PC. I am searching for [free] software that can produce nice looking graphical models, e.g.     Any suggestions would be appreciated. How to use the parskip package? (space in between paragraphs) Extracting matrix rows when one of its elements is part of a list (without a loop) Create any number of paragraph fields in a multiple value field on node create form I have a paragraphs field that takes a term reference.  I need to count how many terms there are for a specific vocabulary and then create that many instance of the paragraphs multiple value field for when creating a node of a certain type. Can this be done with Hook_form_alter ?  It is important that these fields are loaded when the node creation form is loaded rather than the user having to click add more  Any help would be greatly appreciated  I have tried this but when saving the node it doesn't save the new fields  function hook_form_alter(&amp;$form, $form_state, $form_id) {    if ($form_id == 'my_form') {    $item = $form['field_features']['widget']['0'];    // get taxonomy terms   $query = \Drupal::entityQuery('taxonomy_term');   $query-&gt;condition('vid', "my_voc");   $tids = $query-&gt;execute();   $terms = \Drupal\taxonomy\Entity\Term::loadMultiple($tids);    $count = count($terms);    $i = '1';   foreach($terms as $term){     $form['field_features_para']['widget'][$i] = $item;     $form['field_features_para']['widget'][$i]['#delta'] = $i;     $form['field_features_para']['widget'][$i]['#weight'] = $i;     $i ++;   }  } } How to load and parse SVG documents The "I Get It" Reputation Problem I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with Python, and I keep needing a way to add a shapefile to the current map. (And then do stuff to it, but that's another story).  The best I can do so far is to add a layer file to the current map, using the following ("addLayer" is a layer file object):  def AddLayerFromLayerFile(addLayer):  import arcpy  mxd = arcpy.mapping.MapDocument("CURRENT")  df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]  arcpy.mapping.AddLayer(df, addLayer, "AUTO_ARRANGE")  arcpy.RefreshActiveView()  arcpy.RefreshTOC()  del mxd, df, addLayer   However, my raw data is always going be shapefiles, so I need to be able to open them. (Equivalently: convert a shapefile to a layer file without opening it, but I'd prefer not to do that). How do I use multirow in LaTeX? If asking a question or giving instruction towards a group of objects where the number is unknown (and possibly could be one) what is the correct way to phrase the sentence? Which of the following sentences are more correct:     Has there been any studies regarding this and if so what has been the   conclusion?   OR     Has there been any studies regarding this and if so what have been the   conclusions? PHP: how do I copy a temp file upload to multiple places? I want to enable GPU rendering, but there is no option in User Preferences > System:    Why is this? How can I get cycles to render using my GPU? Fantasy novel about kid who controls magic through coin changer device I read this book in high school, and I can't remember what it's called. Some kid learns he has magical ability, but only finds out later that he controls it through some kind of coin changer he's been tinkering with the whole book. Are there any expressions that describe going from a bad to a worse situation? Are there idioms or expressions in English that describe going from one bad situation to one that's even worse?  I heard "between a rock and hard place" but this describes a dilemma not really a transition. I am looking for an expression that describes someone trying to get out of a bad situation but after much effort, the situation only got worse.