I have a file, which contains the name of some files. I want to find the total size of files in the list.  #cat filelist /tmp-directory/connector_db_ connector_db /tmp-directory/connector_db -connector_db /tmp-directory/connector_db_connector_db   As you can see the names of the file contains space, and more badly a hyphen (-). I am trying to find the total size of these files with below command.  #du -sch `cat filelist` du: invalid option -- 'o' du: invalid option -- 'n' du: invalid option -- 'n' du: invalid option -- 'e' du: invalid option -- 't' du: invalid option -- 'o' du: invalid option -- 'r' du: invalid option -- '_' du: invalid maximum depth `b'   I tried adding " " as shown below and then tried which also failed  #cat filelist "/tmp-directory/connector_db_ connector_db" "/tmp-directory/connector_db -connector_db" "/tmp-directory/connector_db_connector_db"  #du -sch `cat filelist` du: invalid option -- 'o' du: invalid option -- 'n' .....   But this works when I use below command, directly in shell.  #du -sch "/tmp-directory/connector_db -connector_db" 0       /tmp-directory/connector_db -connector_db 0       total   So, how to handle such a situation. I have filelist of 3 lac files. More badly, "du -sch" is not handling the list when file list exceeds around 20000. I am splitting the list into 20000 lines with split command. Is there any alternate method for finding the size of 3 lac files easily?
Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?
Proving $M_n(I)\lhd M_n(R)$ and proofs about ideal rings. I'm trying to do a few proofs about rings: $(1)$ I want to show that for a ring $R$ and the ring of matrices $M_n(R)$, if $I\lhd R\implies M_n(I)\lhd M_n(R)$ and that all ideals of $M_n(R)$ are of the form $M_n(I)$. $(2)$ Prove that if $R$ is a ring with division then $M_n(R)$ is a simple ring.  The relation $I\lhd R$ implies that with $r\in R$ and $x\in I$ we have $rx\in I, xr\in I$. But how can I prove the statement for matrices?, here's what I would do: Consider $\psi \in M_n(R)$, if is given any matrix $\phi\in M_n(I)$ it must be $\psi \phi \in M_n(I),\phi \psi \in M_n(I)$, if we denote the element $(i,j)$ of each matrix by $\phi_{ij}$ and $\psi_{ij}$, then $(\psi \phi)_{ij}=\sum_{k=1}^n \psi_{ik}\phi_{kj}$ and $(\phi \psi)_{ij}=\sum_{k=1}^n \phi_{ik}\psi_{kj}$.  Since $I\lhd R$ is $\psi_{ik}\phi_{kj}\in I$ and $\phi_{ik}\psi_{kj}\in I$, which means that $I\lhd R\implies M_n(I)\lhd M_n(R)$.  To show that every ideal of $M_n(R)$ are of the form $M_n(I)$ with $I$ ideal: Suppose $I$ is not an ideal of $R$, then exists $r\in R$ such that $rx\notin I$ or $xr\notin I$, then with taking a matrix $\phi\in M_n(I)$ such that $x$ is an entry of $\phi$ and a matrix $\psi$ such that $r$ is an entry of $\psi$ we get that the matrices $\phi$ and $\psi$ have an entry $xr$ or $rx$, in either case this is not an element of $I$ then the matrix is not in $M_n(I)$. This concludes my proof (is it?) for $(1)$.  For $(2)$ I'd like to proceed by absurdum . Let's say that $M_n(R)$ is not a simple ring, then it has at least one ideal. Denote by $\varphi$ this ideal in $I$, then for any matrix $\psi$ we have $\varphi\psi \in M_n(I)$ and $\psi \varphi \in M_n(I)$.  Now, can $R$ be a ring with division?.I'm not sure how to prove that it can't. I believe I could use this theorem: "If $I\lhd R$ and $1\in I$ then $I=R$. The case $I\neq R$ implies $1\neq R$ and since $\varphi \psi$ and $\psi \varphi$ are in $M_n(I)$ then there are at entries in the product matrix which belong to $I$ (using $I \lhd R$) but are not $1$ (1\notin I); then there are elements in $I$ (and therefore in $R$ by $I\subset R$) that are not invertible, follows that $R$ is not a ring with division. But if $I=R$?, here I can't see a why $R$ can't be a ring with division. Concatenate several columns into one in Google Sheets In bash, how can I convert a Unicode Codepoint [0-9A-F] into a printable character? I have a list of Unicode codepoints, but I don't know of a "simple" way to convert these hex values into the actual characters they represent...    I've heard that zsh has echo -e '\u0965', but I use bash 4.1.  Is there something as simple as the zsh method, for bash? Dual boot windows 8 and Ubuntu with Windows 8 Boot manager I have two partitions on my hard-didk , I have installed ubuntu on my 1st partition and windows 8 later on another partition.Now i can only boot into windows 8 because it doesn't recognize Ubuntu.  How would i dual boot my PC without using grub . I would like using Windows 8 boot manager as its pretty neat.  This is what i have tried :  I tried using easyBCD but it doesn't work.It causes the boot manager to switch to windows 7 Boot Manager .  EasyBCD creates a C:/NST/AutoNeoGrub0.mbr file .  As EasyBCD was causing the boot manager to switch i created a manual entry to the BCD store uisng windows bcdedit command and point it to the C:/NST/AutoNeoGrub0.mbr file created by EasyBCD. This gave me the Windows 8 Boot-Manager with Ubuntu Entry,but grub is unable to find the root partition.  Is there any other work around or solution for this ?  Any help would be appreciated.  Note: The windows 8 boot Manager is sky blue color interactive menu with mouse and other options and windows 7 boot manager is the normal black and white one where you can only use your keyboard  I don't want to install grub because it would prevent my windows 8 from updating as its a genuine MSDN version and various other reasons Code Igniter POST Variable Select translation: where? Can anyone provide some pseudo code for a roulette selection function? How would I implement this:    I don't really understand how to read this math notation. I never took any probability or statistics. Adding shapefile or feature class as layer in ArcMap using ArcPy 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). I've tried to install Ubuntu on a VMWare Virtual Machine, but it never gets past the  bootloader :  ISOLINUX 4.01 debian-20100714 ETCD Copyright (C) 1994-2010 H. Peter Anvin et al No DEFAULT or UI configuration directive found! boot: _   I've also tried to burn this .iso image to a CD and go from therem but I got the same problem.  Some more details :   VMWare Server 2.0.2 Build 203138 on Windows 2008 R2 ubuntu-10.10-desktop-i386.iso image used (downloaded yesterday evening) Integral involving Cosine function What will be the formula for the following:  $$\int_0^\infty \cos(x)dx.$$ I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a parameter and they seem to both be able to do the same things.  Obviously I see that actions are called when actions take place and filters are called when data is manipulated, but it seems to just be a semantic naming difference.  Besides semantics and what they are used for, what real differences are there between them? How do I keep Python print from adding newlines or spaces? In python, if I say  print 'h'   I get the letter h and a newline.  If I say   print 'h',   I get the letter h and no newline.  If I say  print 'h', print 'm',   I get the letter h, a space, and the letter m.  How can I prevent Python from printing the space?  The print statements are different iterations of the same loop so I can't just use the + operator. We're injecting records into a journey using a Salesforce data event.  I also want to advance the people in the journey based on updates that happen in Salesforce (e.g., as an Opportunity record advances through the sales process), but I can't figure out how to do that.  I've read all the documentation I can find, but there doesn't seem to be a Journey Builder widget that will wait to be prompted by an event in Salesforce before continuing someone on a journey.  At the moment, I'm completely stuck.    I'd greatly appreciate any advice or information on how I can make journeys event-driven in this way.  Thanks very much! What is "all" in isset($wp_filter['all']) I'm a newbie in WordPress. I'm trying to understand how it generates the XHTML pages. I guess it's the function of do_action( 'hook-name' ) , but I'm stuck with the understanding of the instruction isset( $wp_filter['all] ) when reading the function do_action because I don't understand what is the meaning of the word all.  Is it a PHP feature or a WordPress one? How do you convert a cake recipe to make brownies? How can one derive Schrödinger equation? Factorial of 0 - a convenience? If I am correct in stating that a factorial of a number ( of entities ) is the number of ways in which those entities can be arranged, then my question is as simple as asking - how do you conceive the idea of arranging nothing ?   Its easy to conceive of a null element in the context of arrays, for example - so you say that there is only one way to present a null element.   But, in layman terms - if there are three humans $h1, h2, h3$ that need to be arranged to sit on three chairs $c1, c2, c3$ - then how do you conceive of a) a null human, and b) to arrange those ( that ? ) null humans ( human ? ) on the three chairs ?   Please note that referral to humans is just for easy explanation - not trying to be pseudo-philosophical. Three balls to be arranged on three corners of a triangle works just fine. So basically, how do you conceive of an object that doesn't exist, and then conceive of arranging that object ?  So, in essence ... is $0! = 1$, a convenience for mathematicians ? Not that its the only convenience, but just asking. Of course, there are many.  If yes, then its a pity that I can't find it stated like so anywhere.  If not, then can anybody suggest resources to read actual, good proofs ? Splitting string into pair of characters in Ruby I have a string (e.g. "AABBCCDDEEFF") and want to split this into an array with each element containing two characters - ["AA", "BB", "CC", "DD", "EE", "FF"]. Can I make any injective function bijective by patching the codomain? Prove that $\mathrm E\left({\max}\left\{X^2 , Y^2\right\} \right) \leq 1 + \sqrt{1 - \rho^2}$ where $\rho$ is their correlation.