Questions tagged [end-of-line]

The end of a physical line

The end of a line is usually signaled by the '\n', '\r' or '\r\n' characters.

The line that has ended is the physical line, as is observed by the line-break in the visual text. This is different from the end of a logical line in programming languages, which is signaled by the ; character in many languages including the family of languages, , etc

134 questions
2
votes
4 answers

search from end of line to next line

I am on Unix using gvim and grep. Problem 1: I need to search an xml file for the following pattern: < sample1> < /sample1> So the problem is the pattern crosses a line. I am new to gvim and grep and could'nt figure this out using my…
Romonov
  • 8,145
  • 14
  • 43
  • 55
1
vote
2 answers

How to append a UILabel to the end of text in another UILabel?

In my project, there's a UILabel in each UITableViewCell. Text in each label varies from 1 line to 2 or 3 lines. (I get each text dynamically.) I wonder how I can append another UILabel to the end of each text in UILabel. I found this Q&A but the…
ROMM
  • 15
  • 7
1
vote
1 answer

How do I stop VB6 Winsock from sending an end of stream byte?

How do I stop VB6 Winsock from sending an end of stream byte? It sends a 0 after each message, and it is messing with my code.
LunchMarble
  • 5,079
  • 9
  • 64
  • 94
1
vote
2 answers

AutoHotKey - clipboard - multiline - double EOL

I need to be able to "type" the content of my local clipboard in a remote session (remote PC is properly locked, no clipboard sharing, the only accepted input is key presses) With AHK, I found the following one-liner to do what I need: ^+1::Send…
Piotr L
  • 1,065
  • 1
  • 12
  • 29
1
vote
1 answer

How to generate CRLF characters in application hosted on Linux server C#

I developed an application in .NET 6 that joins .txt files. When it is generated in the Windows environment, CRLF is displayed at the end of each line, but in the linux environment it only displays LF. What would be the solution to generate with…
Junior
  • 11
  • 1
1
vote
1 answer

RegexStorm.net: How to add \n in Replacement

I have this regex to match: (\
Nov 11, 2016
xxx yyy zzz

11/11/16 - 13:41

It matches OK. I want to insert \n into the replacement so that…
Eddie
  • 83
  • 6
1
vote
0 answers

Is the value of
the same between different OSs?

I'm working on code that's reading the content of an HTML page and removes some of the lines from it. To separate different lines I currently use \n (LF, which is the default end of line in Linux) but suddenly I remembered that in Windows it's \r\n…
Guy Markman
  • 426
  • 1
  • 4
  • 14
1
vote
3 answers

How to remove all strings from array that end with a specific character

I have an array containing a list of file paths within different levels of directories. I want to filter that array to only files,meaning those that end with an / should remain in the array. All paths are no real paths on my file system I could…
Sebastian Barth
  • 4,079
  • 7
  • 40
  • 59
1
vote
2 answers

python regex:Consider end of line as an OR condition in a search, similar to characters in character class

Problem: Find all vowels (more than 2) that are sandwiched between two consonants. These vowels can come at beginning or end of line. Example:- input :- abaabaabaabaae expected output :- ['aa','aa','aa','aae'] solution Tried import…
sakeesh
  • 919
  • 1
  • 10
  • 24
1
vote
1 answer

Append a string at the end of regex matched line using Ansible

Wherever I find the tar command in a file I wish to append 2>/dev/null at the end of the same line. Thus, if /tmp/test.sh file has tar -cf test.tar /myfolder entry then it should get changed to tar -cf test.ta /myfolder 2>/dev/null Below is my…
Ashar
  • 2,942
  • 10
  • 58
  • 122
1
vote
0 answers

Why is GREP end of line is not working on this file?

I trying the following command and it doesn't work: grep -a '2$' text.txt Hope someone could explain this to me. First the file text.txt. When I open it with VIM (Visual Editor) is shows [noeol] and [dos]. If I use set list I see $ at the end of a…
Apojoost
  • 127
  • 10
1
vote
0 answers

How to make TortoisGit ignore line-ending differences on the Commit, Log and Diff windows?

TortoiseGit, supposedly, reads settings from the .gitconfig, .gitignore file(s). In our project, we regularly encounter EOL type changes due to a mix between *NIX and Windows environments, but Git settings takes care of that when committing the…
ysap
  • 7,723
  • 7
  • 59
  • 122
1
vote
1 answer

confusion about ASCII linefeed byte in awk + xxd bash command

I am confused about some 0a (i.e. NL ASCII byte) happening in some bash commands. On the following: $ echo | sha1sum $1 | awk '{print $1;}' | xxd -r -ps > test.bin $ echo | sha1sum $1 | awk '{print $1;}' > test.hex $ xxd test.bin 00000000: adc8 3b19…
Zorglub29
  • 6,979
  • 6
  • 20
  • 37
1
vote
1 answer

Dealing with end-of-line characters cross-platform in C++

I'm busy writing a generic textfile reader class and I'm struggling to write the code to deal correctly with end-of-line (EOL) characters for Mac, Linux and Windows. I've done a some reading on the issue and I came up with the following function…
Kartik
  • 11
  • 2
1
vote
1 answer

How git is guessing content type for purposes of end-of-line normalization?

According to the documentation on .gitattributes, text enables end-of-line normalization: text Setting the text attribute on a path enables end-of-line normalization and marks the path as a text file. End-of-line conversion takes place without…
reducing activity
  • 1,985
  • 2
  • 36
  • 64
1 2 3
8 9