carriage-return

remove all lines in a file containing a string from another file

╄→гoц情女王★ 提交于 2021-02-07 04:31:05
问题 I'd like to remove all the lines of a file based on matching a string from another file. This is what I have used but it only deletes some: grep -vFf to_delete.csv inputfile.csv > output.csv Here are sample lines from my input file (inputfile.csv): Ata,Aqu,Ama3,Abe,0.053475,0.025,0.1,0.11275,0.1,0.15,0.83377 Ata135,Aru2,Aba301,A29,0.055525,0.025,0.1,0.082825,0.075,0.125 Ata135,Atb,Aca,Am54,0.14695,0.1,0.2,0.05255,0.025,0.075,0.8005, Adc,Aru7,Ama301,Agr84,0.002075,0,0.025,0.240075,0.2,0. My

How to include a carriage return in an argument to an executable?

五迷三道 提交于 2021-01-27 10:00:24
问题 I have a simple program that prints out argv character by character, and I want to pass in carriage return ( '\r' or ASCII# 0x0D) as a program argument. How do I achieve this in linux OS (Ubuntu)? I am using bash. #include <stdio.h> #include <string.h> int main(int argc, char* argv[]) { int i; for(i = 1; i < argc; i++) { char* curr = argv[i]; while(*curr != '\0') { printf("[%c %x] ", *curr, *curr); curr++; } printf("\n"); } return 0; } Assuming our executable program is called test , if the

Why does LF and CRLF behave differently with /^\s*$/gm regex?

廉价感情. 提交于 2021-01-24 09:45:08
问题 I've been seeing this issue on Windows. When I try to clear any whitespace on each line on Unix: const input = `=== HELLO WOLRD ===` console.log(input.replace(/^\s+$/gm, '')) This produces what I expect: === HELLO WOLRD === i.e. if there were spaces on blank lines, they'd get removed. On the other hand, on Windows, the regex clears the WHOLE string. To illustrate: const input = `=== HELLO WOLRD ===`.replace(/\r?\n/g, '\r\n') console.log(input.replace(/^\s+$/gm, '')) (template literals will

Extra characters added to multiline textbox

给你一囗甜甜゛ 提交于 2020-08-26 04:23:04
问题 The issue I am having is that when I create a multiline textbox, it prepends (carriage return line feed) characters. I am using .NET 4.5. I created an empty project with just a multiline textbox: <asp:TextBox ID="txtTest" runat="server" TextMode="MultiLine" Rows="5" Columns="50"></asp:TextBox> In firefox and chrome it renders as: <textarea name="txtTest" rows="5" cols="50" id="txtTest"> </textarea> In IE, it is fine. Thank you in advance. 回答1: this is fixed in .NET 4.5 RTM version. Are you

Extra characters added to multiline textbox

て烟熏妆下的殇ゞ 提交于 2020-08-26 04:21:49
问题 The issue I am having is that when I create a multiline textbox, it prepends (carriage return line feed) characters. I am using .NET 4.5. I created an empty project with just a multiline textbox: <asp:TextBox ID="txtTest" runat="server" TextMode="MultiLine" Rows="5" Columns="50"></asp:TextBox> In firefox and chrome it renders as: <textarea name="txtTest" rows="5" cols="50" id="txtTest"> </textarea> In IE, it is fine. Thank you in advance. 回答1: this is fixed in .NET 4.5 RTM version. Are you

Extra characters added to multiline textbox

≯℡__Kan透↙ 提交于 2020-08-26 04:21:37
问题 The issue I am having is that when I create a multiline textbox, it prepends (carriage return line feed) characters. I am using .NET 4.5. I created an empty project with just a multiline textbox: <asp:TextBox ID="txtTest" runat="server" TextMode="MultiLine" Rows="5" Columns="50"></asp:TextBox> In firefox and chrome it renders as: <textarea name="txtTest" rows="5" cols="50" id="txtTest"> </textarea> In IE, it is fine. Thank you in advance. 回答1: this is fixed in .NET 4.5 RTM version. Are you