Convert newline-delimited list with spaces into arguments I'm trying to write a script that I can run from the context menu in Caja (a clone of Nautilus). Its purpose is to pass the files that are selected in the file manager to a given program (for example, 7zip). A list of selected files is provided in the system variable $CAJA_SCRIPT_SELECTED_FILE_PATHS, separated by newlines. I want to pass each line of this variable to the program as an argument, even if they contain spaces.  After failing at quote-wrapping, I tried the following line:  echo "$CAJA_SCRIPT_SELECTED_FILE_PATHS" | xargs -d "\n" 7z a archive.7z   While it worked for 7zip, I changed the script so that the arguments are passed to a program I wrote and something went wrong, so I want a way to execute this in a terminal to get output from the program. I was using xterm -hold -e, but I haven't been able to make a command with a pipe in it execute this way because the shell will try to pipe output from xterm. I also tried shell redirection (by adding &gt; log.txt to the end of the line), and it made a file for 7zip's usual output but a blank file for my program, which outputs messages just fine in the terminal.  Finally, I want a POSIX-compliant (or otherwise standard) solution so that it will work the same way on BSD and Linux.  EDIT: To clarify, I want to change some thing like this:  /path/with/a space /another/path   Into what I would hypothetically get from something like this:  char *argv[]={"/path/with/a space", "/another/path"};   EDIT2: That's how it should be in the program recieving the arguments, not the shell!
Command substitution: splitting on newline but not space I know I can solve this problem several ways, but I'm wondering if there is a way to do it using only bash built-ins, and if not, what is the most efficient way to do it.  I have a file with contents like  AAA B C DDD FOO BAR   by which I only mean it has several lines and each line may or may not have spaces.  I want to run a command like  cmd AAA "B C DDD" "FOO BAR"   If I use cmd $(&lt; file) I get  cmd AAA B C DDD FOO BAR   and if I use cmd "$(&lt; file)" I get  cmd "AAA B C DDD FOO BAR"   How do I get each line treated a exactly one parameter?
This prints 83  System.out.println(0123)   However this prints 123  System.out.println(123)   Why does it work that way? Bind an element to two sources I currently have two text boxes which accept any number. I have a text block that takes the two numbers entered and calculates the average.   I was wondering if there was a way I could bind this text block to both text boxes and utilize a custom converter to calculate the average? I currently am catching the text changed events on both text boxes and calculating the average that way, but I am under the assumption data binding would be more efficient and easier. Which one should be used?      To me, it makes no difference, but I'm not really sure why.   vs     For me, it makes no difference, but I'm not really sure why. How can I make a time delay in Python? When can we use 'much' in affirmative clauses? su command + authentication failure I am having problems with the su command. I know my password and I am typing it correctly but su indicates authentication failure.  So I checked on the internet and then went into recovery mode and changed my username's password to what I was entering before.  Even now entering the same password on su gives me authentication failure.  Please suggest what am I doing wrong?? What measures can/should I take to make sure that security around my SSH server is absolutely impermeable?  This will be community wiki from the start, so lets see what people do to secure their servers. Why can I only change my Stack Overflow name once every 30 days? What makes someone deserving of a Ph.D.? Few days back while attending a thesis defense, one Professor was asking the defender why does he think, he deserves the degree. I was wondering since then, is there really any general answer for that? or the answer should be given describing my own work and then emphasis them how it is important for research field?  I asked the question here to know your opinion about it and to list down what could be the possible answers to this question. "BAD ARCHIVE MIRROR" error while installing ubuntu server 12.04 I downloaded the server version of Ubuntu from Ubuntu's official site. Created a Bootable USB from the ISO file I downloaded. I connected through Internet using DHCP in the installation process. While I was installing it on my Desktop Computer (pentium D 1 GB RAM) I have this error "Bad Archive Mirror".   I also found 2-3 questions with same problem on forum but I didn't get solution of my problem from them. Will higher temperatures damage a computer over time, even when not reaching the maximum temperature? For example, if the maximum is 105 degrees celcius, will the computer break faster when continually having it on 80 degrees celsius instead of, for example, 60 degrees celcius. How can I delete a (null) app in usage? In my usage list(settings>general>storage &amp; iCloud usage>manage storage), there is an app that registers as (null) with no icon, a version number that doesn't match anything I've previously downloaded, and it's taking up storage space. I first noticed it about a week or two ago. And no, I can't download recent apps to find the one that it is, because I downloaded multiple apps recently, and didn't notice the (null) app until my storage was critically low and I was looking to delete something. I am running iOS 9.2.1 on an iPhone 5C. How can I get bash to perform tab-completion for my aliases? I have a bunch of bash completion scripts set up (mostly using bash-it and some manually setup).    I also have a bunch of aliases setup for common tasks like gco for git checkout. Right now I can type git checkout dTab and develop is completed for me but when I type gco dTab it does not complete.    I'm assuming this is because the completion script is completing on git and it fails to see gco.    Is there a way to generically/programmatically get all of my completion scripts to work with my aliases?  Not being able to complete when using the alias kind of defeats the purpose of the alias. Stack Overflow 'review' button is slow, and test questions are slower In the last few weeks, the 'review' button at the top of stackoverflow.com has become very slow. I can count to 20 in some cases (but not always).   In a perhaps related phenomenon, I believe that test questions in the queue often trigger a level of extreme slowness all their very own. If I click on a queue, or 'next' after a review, and the periods sit there throbbing for a good long time, chances are that what will show up will be a review audit. I have a very stupid question. I developed a website that has only one page at the public html directory(index.php).  all content are dynamically loaded as different pages.   How can i SEO my pages for google?  i mean like the what we type in this site are .............i believe stored in database and search engine find these pages like any static pages...  Just a little tip would be appreciable.......! Why are Only Real Things Measurable? Why can't we measure imaginary numbers? I mean, we can take the projection of a complex wave to be the "viewable" part, so why are imaginary numbers given this immeasurable descriptor? Namely with operators in quantum mechanics, why must measurable quantities be Hermitian, and consequently real? How do I remove "Ubuntu" in the bios boot menu? (UEFI) See this   I have this on my Lenovo s205 too.   Is there some way to remove "ubuntu" from the menu? I don't even have it installed anymore. I am looking for a list of all English words that are their own antonyms. Off the top of my head, I can only think of "either", "fast", "to dust" and "to lease", but there must be dozens more. Can you provide a link to a comprehensive list, if such exists?  Also, what are such words most commonly called? I like the term "Janus word" I once heard, but is that widely understood?  Edited by popular demand to make it absolutely clear that this is not a community wiki poll. In the following sentence, I want to know if I've understand the correct meaning or not:     This version holds that the wave function does not so much describe the state of the physical system as the state of our knowledge of the system.    Can we say that it means the wave function describes the state of our knowledge  of the system more than it describes the state of the physical system  ?  It is worth noting that in the Cambridge Dictionary, we read:  not so much sth as sth ​ If you say that something is not so much one thing as something else, you mean it is more the second thing: They're not so much lovers as friends. I don't feel angry so much as sad. I read this book about 20-30 years ago. It's about a group of teenagers who wake up in a huge room where each is on a separate platform. As the book progresses, they go unconscious and the platforms change, move or become connected. The children are punished or rewarded through a variety of methods including food and pain. The goal is to get them to either hurt each other, or see if they band together, I can't quite remember. Please tell me if this sounds familiar.