how to `echo` 'formatted' man page of some command to text file When I execute   echo `man ls` &gt; tem.txt   I get unformatted output in the text file, I mean output without any new lines, just continues sentences. How do I get formatted output ? For example, unformatted output looks like:  LS(1) User Commands LS(1) NAME ls - list directory contents SYNOPSIS ls [OPTION]... [FILE]... DESCRIPTION List information about the FILEs (the current directory by default). Sort entries alphabetically if none of - cftuvSUX nor --sort is speci‐ fied. Mandatory arguments to long options are mandatory for short options too. -a.................
Why does my shell script choke on whitespace or other special characters? 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?
Show that if $n&gt;2$, then $(n!)^2&gt;n^n$.     My work: I tried to apply induction. So, at the induction step, I need to prove, $n^n&gt;(n+1)^{n-1}$ Here, I tried to use induction again without any luck. I also took log of both sides, but I did not get anything. Please help! Trouble with batch conversion of .png to .pdf using convert The  currently says  In the context of Stack Exchange sites, any copying and pasting of any amount of text or code that wasn't written by you is plagiarism if you try, explicitly or implicitly, to pass it off as your own work. (italics mine)  There is also a concept of . Should this also be addressed in the FAQs? In other words, is it OK to copy (large parts of) your own answer  without proper attribution? Show that product of primes, $\prod_{k=1}^{\pi(n)} p_k < 4^n$ This an interesting problem my friend has been working on for a while now (I just saw it an hour ago, but could not come up with anything substantial besides some PMI attempts).  Here's the full problem:  Let $x_{1}, x_{2}, x_{3}, \cdots x_{y}$ be all the primes that are less than a given $n&gt;1,n \in \mathbb{N}$.   Prove that $$x_{1}x_{2}x_{3}\cdots x_{y} &lt; 4^n$$  Any ideas very much appreciated! Audio is working, but the speaker test doesn't work I've installed Ubuntu 12.04 LTS from a minimal cd on a netbook (Asus 1001 PXD). I've installed the ubuntu-desktop package using the --no-install-recommends option.  Everything works fine, except the "sound test" for headphones or analog speakers.  Clicking on the "test" buttons (front left and front right) I don't hear any sound. Despite this, the audio is working properly.  I've checked the audio levels with alsamixer; I have also checked that the test sounds actually exist in /usr/share/sounds/alsa.  I tried an installation of Ubuntu 12.04 LTS made with the desktop-cd, and in this case the speaker test works properly.  I suppose, therefore, that the problem could depend on the lack of a package, but I have not identified which one. Was Severus Snape made a Death Eater before or after he told Voldemort about the Prophecy? Based on discussion in comments on , was Severus Snape a Death Eater (real one, with Dark Mark) before he overheard Sybil give the Prophecy to Dumbledore and relayed it to Voldemort? Or was he made a DE after that?  Canon sources only please (books/interviews/Pottermore) Expressing $1.24\overline{123}=1.24\;123\;123\;123\;\ldots$ as the ratio of two integers I use Lasso logistic regression in order to identify a smaller subset of important variables. I start with N=51 (28/23) and 32 predictors.   So far it looks pretty promising, because I can identify four important predictors in my optimal model.   Now I would like to take those four predictors and examine them along with some control variables in a standard logistic regression.   My question is, does that analysis strategy make sense? Is there a better way to include controls or other variables that might be interesting?  For a better understanding:   Identify important variables via Lasso logistic regression Do further analysis including identified predictors and other control variables using standard logistic regression (using AIC to check model fit) Problems with Curve Modifier How can I restrict various roles with limit in creating nodes of a particular content type What do viruses do? There are those big green spiked things that my friends call viruses. I don't know what they do and I want to know. Do the viruses do something to the device you are playing on? Are they good or bad? How to install Ubuntu 18.04 alongside Windows 10 Windows 7 SP1 Windows Update stuck checking for updates I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen.    I tried running the tools in , but this did not fix the issue either:  No matter what I do it just hangs on the "Checking for updates..." screen and goes no further. How to use ampscript in order to pull user data from a second data extension? We have several data extensions that have data relationships with each other.  How can I send an email using one data extension while pulling data from a second data extension to personalize my email with ampscript?  I've tried Lookup in many different ways, but I've only managed to pull one specific row (the same row which is not personalized to each user) or all rows at once. I haven't been able to pull personalized data for each user.  In practice, I want to pull data from a DE called "Survey". Each user has a specific ID and some users have an "AnswerID", which varies. I want to to create IF/THEN statements based on that AnswerID.  Thanks, Sylvie Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in  games, etc.), and then have it Ajax itself back to the server in-order to do stuff.  I originally thought the best way would be to just get the text inside the textarea, and then split it, or should I use the keyup event, convert the keycode returned to an ASCII character, append the character to a string and send the string to the server (then empty the string).  I couldn't find any information on getting text from a textarea, all I got was keyup information. Also, how can I convert the keycode returned to an ASCII character? Prove that $(p+q)^m \leq p^m+q^m$ Why do birds sitting on electric wires not get shocked? When we touch electric wires, we get shocked. Why don't birds sitting on electric wires not get shocked? Is the humanoid appearance of most alien species in the Star Trek universe ever canonically addressed? The vast majority of intelligent species in the Star Trek universe are bipedal, humanoid creatures.  From the lot I've seen of TOS, TNG, DS9, Voyager, Enterprise, and the movies, it seems that this coincidence goes largely unquestioned.  Metaknowledge grants that it is much easier to have human actors portray human-like beings, and so this was probably done due to budgetary/technological limitations.  However, I'm wondering if an in-universe reason for this was ever given or explored? How can I improve Ubuntu overall system performance? What are your tips for improving overall system performance on ubuntu? Inspired by this  I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster.  This is not meant to be application specific (e.g. make firefox load pages faster), but system wide.  Preferably 1 tip per answer, with enough detail for people to implement it.  A couple of mine would be:   Install  (via Software Center or sudo apt-get install preload); Change  value - "which controls the degree to which the kernel prefers to swap when it tries to free memory";   What are yours?  PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box. System freezes completely with Intel Bay Trail My system freezes completely at random, frequent intervals. I started to have the same problem in Ubuntu 14.04 but after recent upgrade to 16.04 there is no improvement, in fact it seems worse.  When it happens, it's impossible to do anything. I've tried everything in this thread:  but nothing works, I have to hard reset. I have read all the system logs and journalctl but there is never any information that could help diagnose the problem.  This is a dual-boot system with Windows 10 and there's no problem there, so it's not defective hardware.  My laptop has an Intel Bay Trail processor (Pentium N3540)