Skip to main content

Questions tagged [newline]

Newline refers to a character sequence representing a line break in text (also known as End of Line, EOL, or Line Break). Different operating systems have different sequences for newlines.

newline
0 votes
3 answers
53 views

In batch (`.bat`), how do I set a variable to print multiple newlines?

From this other SO post, learned that SET n=^&echo( echo First line%n%%n%Second line prints First line Second line How do I define nn to print 2 new lines? The following didn't work SET n=^&...
joseville's user avatar
  • 841
1 vote
0 answers
34 views

Git: Want to propagate (rebase) LF vs. CRLF changes through branch revisions

Say, I have a branch with several commits in it. In versions A and B, I have a file with mixed line endings (mostly LF, but some CRLF), and made various other changes to it. In version C, I made ...
Some Guy's user avatar
  • 486
-1 votes
2 answers
72 views

How to prevent a paste in a cell with carriage returns from overwriting the values ​below?

In apps script, how to prevent pasting text in a cell (keyboard shortcuts) with carriage returns from overwriting the values ​​below? I tried a onedit(e) function, but we cannot intercept keyboard ...
ericire's user avatar
  • 417
0 votes
1 answer
81 views

About writing/reading "\r\n" to/from a file

Why, if you write a string containing "\r\n" to a file opened in binary mode, and then read that string from the same file, but opened in text mode, then the string will contain '\n' ...
Pavel's user avatar
  • 141
0 votes
1 answer
73 views

git add --renormalize does not re-checkout my files with the correct line endings

I have a repository which I use between Windows and Linux. Currently some files, for example the file myfolder/myfile.txt is stored with CRLF (DOS) line endings and checked out with CRLF linedendigs. ...
halloleo's user avatar
  • 9,924
2 votes
0 answers
72 views

R shows newline when printing character vector

When printing a character vector, R shows a newline between the first and the second element, but not between the 2nd and the 3rd, and then again between the 3rd and the 4th. Why is that? Code: > ...
robertspierre's user avatar
0 votes
0 answers
68 views

Pygments newlines and white-space causing lexing errors

( This question needs to be reworked as all the problems except those involving conditional instructions have been solved. As the question is now, it's a mess ) First, a big N.B. : I am not a Python ...
jdb2's user avatar
  • 101
3 votes
2 answers
61 views

convert newlines to windows newlines [duplicate]

I want to convert all newlines in my input string to windows newlines (\r\n). So I want to apply the following mapping: \r\n -> \r\n \r -> \r\n \n -> \r\n How should this be done?
ItIsJustMe's user avatar
0 votes
1 answer
84 views

Cannot inject newline characters into input field using Nodriver

I am using Python to automate interactions with a web application. My goal is to send newline characters into an input field to separate domain names, but all attempts have failed to properly input ...
divinem's user avatar
  • 11
0 votes
0 answers
20 views

Qtspim does not respond during new line

I was making a program for Qtspim that prints from 1 to 10 using a while statement. It worked fine but the console output was 12345678910, so I wanted to add new lines to be fancier. This is my code. #...
user24989619's user avatar
0 votes
2 answers
75 views

Can I use Notepad++ to remove line breaks from strings and keep things neat?

I'm working on translating an old game. I have the strings displayed/organized like this This is a sentence that you really need to read.<End> This is also a sentence that you need to read.<...
Arlen Pavka's user avatar
0 votes
2 answers
69 views

Why does `echo` interpret "\n" as new line character only in interactive shells and not when executing a shell script?

Why does echo interpret "\n" as new line character in interactive shells only and not when executing a shell script also? Running in an interactive bash shell: $ echo "hello\nworld"...
Semnodime's user avatar
  • 1,987
0 votes
1 answer
58 views

Adding variables to an API payload with new lines in Python

I am pretty new to Python, and what I'm trying to achieve is to add variables to the payload below in Python; it's meant for Zeptomail API, and I'm trying to customize and add user-specific data to ...
Raymond's user avatar
  • 13
-1 votes
1 answer
97 views

Why isn't "\n" interpreted as newline character when a String like, "abc\nabc" is given as input via Scanner class in Java?

In Java, when we try to print a Hardcoded String like, "abc\nabc", we observe a line change after the first abc but when we take same input via sc.next() or sc.nextLine() it prints out '\n' ...
Digvijay Singh's user avatar
0 votes
0 answers
14 views

formatting text lines dos2unix

I have a new line conversion problem of a file from one format to another. I used the follwing code to remove the ^M character: perl -pe -e 's/\r\n|\n|\r/\n/g' "inputfile" and it ...
Urza_tron's user avatar

15 30 50 per page
1
2 3 4 5
342