How to keep the field separator when printing $0 with awk I try to modify one column of my file, then print the result.  awk -F"|" '{ if(NR!=1){$5 = $5+0.1} print $0}' myfile   It does what I want, but when printing, only the first line keeps its field separator.( the one, i don't modify).  So I could use print $1"|"$2"|"$3"|"$4"|"$5"|"... but isn't there a solution using $0 ? (For example if I don't know the numbers of column)  I believe, I could solve my problem easily with sed, but I try to learn awk for now.
Delimiter is being changed with fields I have a file with values organized in columns, and separated by commas, as in the file below:   324,01,1,113333600000,1,, 016,01,1,134954200000,1,, 770,01,1,109069200000,1,, 853,01,1,111518800000,1,,   When I use the following awk command, the delimiter is being changed from commas to spaces   Code:  awk -F, '{$4=$4/1024}{print $0}'   The output becomes:   324 01 1 110677343.75 1   016 01 1 131791210.93 1   770 01 1 106512890.62 1   853 01 1 108905078.12 1    How can I change the value of the field without changing the delimiter?
I know blender can display both orthographic and perspective projection. But, when we look at a cube in blender's viewport, I'm unable to distinguish by eye, if the projection in the viewport is a one-point, a two-point or a three-point perspective. What does blender use, and is this something changeable? What's the recommended max width for the main container and for the main column, for large screens? Based on this question,  and its comments and answers, I did some research, but I didn't find a complete answer.   For me it is obvious that it is a good decision to limit the width of the main container, but what is the recommended max-width for the main container for large screens, in 2017, when the screens become larger and larger? What variables should be considered in this decision?  Also, let's say a website has multiple columns in the main container, what is the max-width for the main column?  Update: I have now a related question. I recommended to one client to reduce the width of the main container on the homepage, but I can't convince him. It is a website with photos, like pexels.com. It is in this case important to limit the width if the elements are not one more important than other? How to install Redis on Ubuntu 16.04? I am working with Laravel but i have installed all on my own (php, mysql, composer, nginx) and now i need to install Redis and configure it so i could use it for queue driver in Laravel.  How to install it, because it cannot be installed through apt-get install redis  i get this error:  ubuntu@ubuntu:~$ sudo apt-get install redis [sudo] password for ubuntu:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package redis Delete with Join in MySQL Here is the script to create my tables:   CREATE TABLE clients (    client_i INT(11),    PRIMARY KEY (client_id) ); CREATE TABLE projects (    project_id INT(11) UNSIGNED,    client_id INT(11) UNSIGNED,    PRIMARY KEY (project_id) ); CREATE TABLE posts (    post_id INT(11) UNSIGNED,    project_id INT(11) UNSIGNED,    PRIMARY KEY (post_id) );   In my PHP code, when deleting a client, I want to delete all projects posts:  DELETE  FROM posts INNER JOIN projects ON projects.project_id = posts.project_id WHERE projects.client_id = :client_id;   The posts table does not have a foreign key client_id, only project_id. I want to delete the posts in projects that have the passed client_id.  This is not working right now because no posts are deleted. HDMI/Displayport audio control for OS X Schengen visa application rejected because my US visa stamp expires in December. What are my options? I went to the Italian consulate in Washington, DC today and they would not accept my visa application because they said my US visa stamp cannot expire less than 3 months after the end of my trip to Italy. Here's my relevant visa and trip info:   US visa stamp expires on 16 Dec 2015 I-797 valid until 3 Mar 2017 Trip to Italy is from 15 Oct to 25 Oct 2015   Is it true that my visa stamp needs to be valid for 3 months after my trip, even though I can legally stay in the US until 2017? Does anyone have any suggestions for getting a Schengen visa in my situation? I have no idea how to find this integral:  $$\int_0^1\frac{(x-x^2)^4}{1+x^2}\ dx\ ?$$  Any help would be appreciated. Thanks in advance. Array slices in C# How do you do it? Given a byte array:  byte[] foo = new byte[4096];   How would I get the first x bytes of the array as a separate array? (Specifically, I need it as an IEnumerable&lt;byte&gt;)  This is for working with Sockets. I figure the easiest way would be array slicing, similar to Perls syntax:  @bar = @foo[0..40];   Which would return the first 41 elements into the @bar array. Is there something in C# that I'm just missing, or is there some other thing I should be doing?  LINQ is an option for me (.NET 3.5), if that helps any. Where to start with the Star Wars books? Display Database Instance Relationship with TikZ I'm trying to display all of my corporate database instances and their relationship to each other, so to speak the database links. I found the geometry shape cylinder using TikZ \usetikzlibrary{shapes.geometric}, but I'm new to the whole TikZ stuff and it doesn't worked out that well so I thought maybe you could help me getting something like the following figure:    There will be a ton of instances and arrows, but I hope that you guys could give me a start so that I could do the rest on my own. My Father passed away - next test(s) on what remains of his DNA sample? I posted this general question over at the forum on FamilyTreeDNA. Though I received a reply, there is still no answer to my question, so I thought I'd try my luck at posting here.  Anyhow, in early 2009 I bought two kits for the Genographic Project and dutifully had my father do his cheek swabs: one kit for his Y-Chromosome, and one for his mtDNA. Once that was completed, I had his samples transferred to Family Tree DNA.  Then, late in 2009 I paid to have an mtFullSequence done on his mtDNA sample.  My father passed away in 2015. In early 2016, I phoned FTNDA to discuss. The first thing they did was arrange to merge his two original samples into one kit. Then, they suggested doing Family Finder. I did that and recently obtained the interesting results.  So, all told what I have done on my father is:   Y-12 (originally done for the Genographic Project) mtFullSequence Family Finder   My father's Y Haplogroup is R-M269 and I am being presented with the M343 SNP pack on FTNDA.  My question is, what now? My father is gone so the sample that remains with FTDNA is old and finite (their customer service says they still have "one container" of his DNA). His siblings have all passed away -- unfortunately, with no samples taken. What is the best way to make use of the sample of my father's DNA that is left?  Should I refine the Y-Chromosome to Y-111? That seems the most natural (though I'm a male and carry it too). Should any SNP tests best be done on his remaining sample as opposed to on me? Or, should I do nothing and just let his 2009 samples continue to sit at FTDNA?  By phone, FTDNA said that they should have enough left to do the Y-111 and a SNP pack which is great, but I'd love to know independent of their customer service if that is the wisest way to make use of the remaining DNA sample which they have?  Full disclosure: I did have my father do 23andMe in 2010 and I did have his blood drawn and sent to a DNA Bank. I hope to never touch his banked DNA (except maybe to do a full sequence someday), but at least it does exist. My question now is solely how to best make use of my father's remaining sample at Family Tree DNA? return statement vs exit() in main() Should I use exit() or just return statements in main()? Personally I favor the return statements because I feel it's like reading any other function and the flow control when I'm reading the code is smooth (in my opinion). And even if I want to refactor the main() function, having return seems like a better choice than exit().  Does exit() do anything special that return doesn't? The most efficient way to implement an integer based power function pow(int, int) What is the most efficient way given to raise an integer to the power of another integer in C?  // 2^3 pow(2,3) == 8  // 5^5 pow(5,5) == 3125 Body Diode of a MOSFET So for some MOSFETs, specially with Power MOSFETs, the body diode is a flyback diode that (as far as aI can tell) can be conveniently added to the MOSFET's bulk as there already PN junctions (correct me if I'm wrong).  I've looked at the datasheet of a Power P-MOSFET and it has parameters like "Internal Source Inductance" and "Internal Drain Inductance". So, is the build up of reverse voltage on the source and drain sides, when said MOSFET is suddenly turned off, a behavior intrinsic to (at least some) MOSFETs? Or are these from the rest of the circuit, say inductive loads? How can I automatically forward Facebook messages to my email or phone? I can create email addresses that forward to other email addresses.  Likewise, can I automatically forward Facebook messages to either my email or phone? Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX? I understand that \bf and \it are now obsolete in LaTeX and that \textbf and \textit are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font style. I have read the  and I understand the rules and their reasons, as well as the several other commands that are affected.  However, I find it convenient to use LaTeX for notetaking during lectures, and in that rushed environment, shortening a command by any number of keystrokes helps keep me from falling behind. \bf and its two-letter kin are still very useful to me for that reason, and once a presentation is finished I can go through and replace all appearances of \bf et al. with \textbf et al.  My question is this: is there a plan eventually to replace the short font style commands like \bf with the implementations of \textbf etc. some day, or should I expect \bf always to remain in existence but obsolete, for reasons of backward compatibility with original TeX? Original TeX has been greatly improved on in countless ways, but in the heat of transcription I sometimes miss its conciseness. Sorting list based on values from another list Check if partition is encrypted How do you "OR" criteria together when using a criteria query with hibernate? Output to stdout and at the same time grep into a file