Questions tagged [linefeed]

Linefeed, also known as LF, is a character that controls the switching to the next line.

Linefeed, also known as LF, is a character that controls the switching to the next line.

303 questions
2
votes
1 answer

Why \n line feed works in find and \r carriage return works in replace as new line?

I got a file with text in this format. (with unwanted line spaces) 1 2 3 Now I wanted to use vim to remove those unwanted lines with this command :%s/\n\n/\n/g. replacing two new lines with one. But got this result: 1^@2^@3 then I found out…
2
votes
5 answers

Carriage return required when printing to the console in Windows?

It seems like just putting a linefeed is good enough, but I know it is supposed to be carriage return + line feed. Does anything horrible happen if you don't put the carriage return and only use line feeds? This is in ANSI C and not going to be…
Sydius
  • 13,567
  • 17
  • 59
  • 76
2
votes
1 answer

XSLT transformation adding unwanted Linefeed

Using Vs 2010 I am editing a xsl file which will be used for transformation to output an xml file. I am trying to output a carriage return ( ) and that only. I don't want the linefeed character (x0A) to appear. No matter what kind of stunt I do in…
2
votes
0 answers

Jupyter notebook get's end of line removed in Pycharm

On any save, despite all on save formatting being turn off, PyCharm removes the newline at EoF for Jupyter Notebooks. I've tried the Ensure Newline on all files is turned on. I've even tried using .editorconfig, but no matter what I do the newline…
2
votes
0 answers

Why does a line feed command \n create an additional carriage return command \r?

I'm trying to flash some code to my Nordic Semiconductor nRF52832 32-bit MCU which is integrated on an DWM1001 UWB module. The module sends formatted (MAVLink v1 protocol with a message size of 101 bytes) position data as unsigned chars to its…
Felix_95
  • 21
  • 2
2
votes
2 answers

Preserving newlines (line feeds) in SAS when importing from excel

I am importing a dataset from excel using the built in import data wizard. However, when viewing the data in SAS, cells with newlines have all line feeds (alt+Enter) replaced with a period (.) For example, in excel: "Example text with new line" will…
Pmmoks
  • 35
  • 3
2
votes
4 answers

Why don't escape sequences work in tuples

Why dont the escape sequences work in tuples when printed x = ("a\n", "b\n", "c\n") y = ("a\n" "b\n" "c\n") print (x) print(y) Why does it print(x) return ('a\n', 'b\n', 'c\n') and print (y) a b c
James
  • 23
  • 4
2
votes
2 answers

Batch: delete line feed from end of text file?

I have a .txt file where I need to get rid of the last line feed. Looking at the file in a HEX Editor it shows "0d 0a" at the end. I have looked at the thread How to delete Linefeed using batch file but that did not help. I have tried COPY source…
Peter
  • 1,786
  • 4
  • 21
  • 40
2
votes
1 answer

Why does hexdump resolve 0x0A to a dot?

The question is based on the output of the following command: $ hexdump -C acpid.pid 00000000 36 39 37 0a |697.| 00000004 As expected, 0x36 0x39 0x37 are resolved to their associated symbols 6 9 7. Since 0x0A…
Diggi55
  • 174
  • 8
2
votes
1 answer

A question of strstr() and fgets() in a demo from the book《Head First C》

char tracks[][80] = { "I left my heart in Harvard Med School", "Newark, Newark - a wonderful town", "Dancing with a Dork", "From here to maternity", "The girl from Iwo Jima", }; void find_track(char search_for[]) { int i; …
Hao Wu
  • 111
  • 6
2
votes
1 answer

How can I change which line ending style is used in the emacs shell (Carriage return / line feed)?

I am working on a windows 10 machine using Emacs and plink to connect to a Linux development server. I am able to start a shell in Emacs using M-x shell and ssh to the server with plink server When I press enter on my keyboard it's like I have…
CodeSmith
  • 103
  • 5
2
votes
6 answers

Replace Line Feed with a Space in unix shell script

I have a text file containing some records. Each record is splitted in 4 rows (not always 4), like the example: ---- row1 row2 row3 row4 ---- row1 etc... Each row is ended with the Line Feed character (LF). Ok, I need to obtain the record in only…
Possa
  • 2,067
  • 7
  • 20
  • 22
2
votes
2 answers

What does exactly mean by 'Line feeds' in HTML and PHP? How do they are added in HTML and PHP code?

I was reading PHP Manual and I come across following text paragraph : Line feeds have little meaning in HTML, however it is still a good idea to make your HTML look nice and clean by putting line feeds in. A linefeed that follows immediately…
PHPLover
  • 1
  • 51
  • 158
  • 311
2
votes
2 answers

Updating a printed string on stdout in python3

I am trying to update a line printed to stdout using python and a formatted string. The line is printing, but on each loop through it prints on the same line, next to the previous printed update. item = ("{}{}{}{}".format(totalAllScraped, …
2
votes
1 answer

C - fgets skips CR character

I have a c code, simply reads a line from a txt file. The file has only one line which is as below: The code snippet to read this line is: int** readFile(char* filename){ int col=0, row =0; int i=0; int* numList[2048]; for(int i =…
Ugur KAYA
  • 167
  • 3
  • 14