FAQ Database Discussion Community


bash script grep using variable fails to find result that actually does exist

bash,curl,sed,grep,carriage-return
I have a bash script that iterates over a list of links, curl's down an html page per link, greps for a particular string format (syntax is: CVE-####-####), removes the surrounding html tags (this is a consistent format, no special case handling necessary), searches a changelog file for the resulting...

VBA Return Carriage and Fill Code

excel,vba,excel-vba,return,carriage-return
I'm really new to vba and would appreciate any assistance in the following problem I'm having. Problem description (in relation to diagram below): 1*) In c, I have managed to separate the return carriages, which leads to 2*) now that each return carriage has it's own row, I need column...

Newline and / or Carriage Return in Swift String

ios,swift,uitextview,newline,carriage-return
I am attempting to add a Newline or Carriage return in a UITextView. var text = UITextField() text.text = "This is a text \r\n This is a text" The result shows the entire text on one line: This is a text This is a text Is it not possible to...

Blank line gets removed in HTML mail -> how to add
after blank lines

php,carriage-return
In order to maintain formatting in an HTML mail, I'm looking for some php code to change a blank line into <br>. For example, the original text: Line 1 Line 2 Line 3 Should turn into: Line 1 Line 2 < br > Line 3 I tried nl2br, but that...

insert carriage return before a regular expression in a text file using unix shell

regex,bash,shell,unix,carriage-return
I have a messy text file (about 30 Ko) containing data that I have to reorganize using a shell script. The file exibits a simple pattern : A "parameter number" (value between 10001 and 10999 ) is followed by several other values ( floats ). Values are separated by a...

R read.csv how to ignore carriage return?

r,csv,carriage-return,read.table,read.csv
I need to read a text file (tab-separated) that has some carriage returns inside some fields. If I use read.table, it gives me an error: line 6257 did not have 20 elements If I use read.csv, it doesn't give an error, but creates a new line in that place, putting...

How to preg_replace from indentifier to end of text with CR(LF) characters

php,preg-replace,carriage-return,linefeed
I'm trying to split a piece of text (actually html) into two pieces, a top and bottom part. An 'identifier' (<--#SPLIT#-->) in the text marks the position to split. To get the upper part I have the following preg_replace that does work: $upper = preg_replace('/<--#SPLIT#-->(\s*.*)*/', '', $text); This leaves me...

Adding carriage returns to Html control eg) div or span

c#,html,asp.net,webforms,carriage-return
This code ASPX file: Relates to: <div ID="relatedMeasures" runat="server"></div> <br /> Code behind loops through items and appends to a string... foreach (int id in mcsMeasuresSelected) { if (mcs.Id == id) { // Add to selected mcsSelectedMeasures.Add(mcs); output += mcs.Measure + Environment.NewLine; } } relatedMeasures.InnerText = output; Then the output...

How do to I read in data from a text file which is carriage return line feed delimited to matlab?

matlab,text-files,carriage-return
I have a file which has a 32 line header of text, the rest is data (doubles) - one value on each line. Each line is carriage return line feed delimited. I have tried using: fscanf sscanf textscan and: dlmread This seemed the most likely option but I can't seem...

Android carriage return inside concatenated string

android,textview,concatenation,carriage-return
A quick question please. I am reading an NFC tag and showing the result on the screen of my device and this is how it appears: The content of the tag is : bla bla bla I want to have 2 lines appearing as this: The content of the tag...

J turns carriage return into newline

console-application,carriage-return,j
I'm trying to implement a progress bar for a command line application, e.g. [##### ] 50% complete I know I can just backspace to the start of the line and overwrite, but that seems so gross. I'd rather use the carriage return to put the cursor at the first column...