Skip to main content

Questions tagged [newlines]

Filter by
Sorted by
Tagged with
0 votes
0 answers
171 views

Slack new line in the numbered list

How would I insert a new line in Slack when using numbered lists? What I need: 1. First paragraph.<br> New lined text in the first paragraph. 2. Second paragraph. When I hit Enter/Shift-...
Goltsev Eugene's user avatar
5 votes
1 answer
94 views

Less --hilite-unread prints carriage return ^M on blank lines

When printing files with Windows line endings (CRLF), less shows carriage return ^M in blank lines when option --hilite-unread is used. Lines with any text display correctly, skipping the carriage ...
Pawel's user avatar
  • 211
3 votes
4 answers
440 views

How to remove all newlines from a file?

I have the command cat file.txt | gawk '{print $2}' > test which displays: 1 1 0 0 1 1 Afterwards: vi test :%s/\n// Which outputs: 110011 My question is I don't know how I could incorporate this ...
Antonio De Angelis's user avatar
1 vote
2 answers
580 views

How to make git bash on Windows not emit `\r`?

Problem statement I'm on Windows, and sometimes would like to execute commands inside docker containers, but I'm unable to execute those with the error <command>\r: command not found. For ...
JBSnorro's user avatar
  • 257
0 votes
1 answer
304 views

How to set Notepad2 to use Unix newlines (LF) by default

Each time I create a new file in Notepad2, the default line break is Windows-style: a carriage return (CR) followed by a line feed (LF). How can I instead set Unix-style line endings (LF) as default?...
Henke - Нава́льный П с м's user avatar
0 votes
1 answer
934 views

How to stop output separated by blank lines with xmllint

I have the following xml generated from Gnote: <?xml version="1.0"?> <note version="0.3" xmlns:link="http://beatniksoftware.com/tomboy/link" xmlns:size="...
Yetoo's user avatar
  • 13
0 votes
1 answer
43 views

Is there an easy way to convert LFs to CRLFs on a Chromebook?

The subject line says it all: is there an easy way -- something equivalent to the linux "unix2dos" utility, or a very old Macintosh droplet that I have on my home iMac -- to convert a text ...
hbquikcomjamesl's user avatar
1 vote
0 answers
954 views

Where is the carriage return character?

I am confused about the carriage return character \r in Windows. As everybody knows, Windows uses CRLF, i.e. \r\n, to terminate lines. So I thought, and tested it out. I opened Visual Studio Code, ...
csstudent1418's user avatar
0 votes
1 answer
802 views

When opening a plain text file with Chrome, how can I know how many lines the text contains?

I'd prefer not having to copy the text to another program, as it may be very large (example).
Franck Dernoncourt's user avatar
0 votes
1 answer
62 views

Is there a written definition for line count of a text file? [closed]

Is there a definition or definitions for line count of a file? A command like wc -l data.txt would only count the amount of newline characters. But this ignores scenarios such as where contents are ...
Kasper Kivimäki's user avatar
1 vote
1 answer
9k views

Heading and Normal styled text on same line in MS Word

Is it possible to add Heading 1 and Normal styled text on the same line in MS Word (apart from using tables)? http://www.wordbanter.com/showthread.php?t=9944#2 Type the "Heading 1" text on ...
haba713's user avatar
  • 125
0 votes
2 answers
2k views

How to join lines between line spaces in notepad++

Is there a way to join lines between new lines (return), and keep the new line (return)? Been doing it with Ctrl+J after selecting the text between the new lines, but not practical with large ...
mr_kultist's user avatar
0 votes
0 answers
91 views

Specify then LOCK the line --LENGTH-- for a drawing

I am sketching out a section of my backyard with trees, a fences, and some big rocks to determine how large of a shed I can put "in the backyard." Measurements to all the trees have been ...
Kirk Thompson's user avatar
0 votes
5 answers
2k views

Excel: Sum all numbers separated by new line within cell

How do I create a new cell that equals the sum all numbers in a cell separated by a new line? I may not use text to columns as that is messy and there's no new line separator delimiter in text to ...
user avatar
0 votes
1 answer
1k views

Prevent PowerPoint from forcefully inserting new lines after putting a hyphen "-"

In a bullet-list, my first point contains the text Dot-notation: $.store.book[0].title The container text-box looks like so (as you can see, the second point is also affected): The problem is that ...
Andreas L.'s user avatar
0 votes
1 answer
53 views

How to append a carriage return to replacement text in osx bash script

I've tried numerous answers that I searched for here, and for some reason nothing is working I have a bash script which I'd like to use to process a series of files. Here's a simplified example a sql ...
slashdottir's user avatar
1 vote
0 answers
347 views

Reading a reg key that contains a CRLF?

If a registry key, exports to a reg file as: [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\key ] "test"="1" and from a PS window, the following works: Get-ItemProperty -Path "HKLM:...
HelpingHand's user avatar
  • 2,498
1 vote
1 answer
427 views

How to fix broken "newline" from Mac to Windows

I have been given a set of python codes (.py) which were written on Mac. Unfortunately, when I open them on windows (pycharm, notepad, even word), there are no line breaks. I asked for .txt versions ...
safex's user avatar
  • 135
0 votes
2 answers
591 views

How to insert new line separator on regular (every 13th) intervals of delimiter in text file which has no new line separator

I have a TXT file which has some raw data. I need to convert them into Excel, but my attempts are not successful. The file has hundreds of times the delimiter (separator) and that helps me convert to ...
Kampun's user avatar
  • 3
0 votes
2 answers
5k views

How to replace \r\n to \n in Windows in a large text file?

I have a text file in my Windows computer of size about 8 MB. I wanted to replace all the \r\n line-breaks to \n line-break (around 2*10^5 replacements) in the file. However, the only way I know is ...
Sawarnik's user avatar
  • 103
1 vote
1 answer
472 views

Linux shell backslash-newline for long JSON string

I am using curl with a really long -d, --data <data> field containing JSON. I would like to use backslash-newline to wrap around the JSON in the middle of the JSON string. Here's an example: (...
Intrastellar Explorer's user avatar
0 votes
1 answer
252 views

Change row delimiter for a specific column in Excel

I have a excel file which contains data as below. +-------+----------+-------------------------+-----------+ | ID | Material | Description | Attribute | +-------+----------+------------...
Avinash's user avatar
  • 103
0 votes
1 answer
138 views

Minimum version of notepad.exe to support unix newlines

A while back, Microsoft announced their development build of notepad finally supports unix style newlines (\n). However according to a colleague, this is not the case in a Windows 10 testing ...
phg's user avatar
  • 195
4 votes
1 answer
8k views

Newline (\n) handled differently by zsh vs bash - how to fix?

If I run the script below using zsh and bash, I'm getting different results. Interestingly, this is caused by the \n newlines in the input string. Using zsh, I get the correct result: rene@MININT-...
Krumelur's user avatar
  • 189
2 votes
1 answer
8k views

Why does telnet send CRLF when I press enter?

On the telnet provided with my system (Debian), line feeds (\n) seem to be translated to CRLF (\r\n). Specifically, if I run, e.g., netcat -l -p 3334 > file and run echo a | telnet localhost 3334 ...
a3nm's user avatar
  • 1,275
1 vote
2 answers
32k views

How to Backspace New Line Characters in Notepad++

I have a file with the following format dhdh |jgfgf hhgfh I want to find the | (pipe) symbol in a new line and replace it with backspace For finding this, my regex is as below ^[|]{1}[a-zA-Z] It ...
Naveen K. Sanadhya's user avatar
0 votes
2 answers
944 views

Why isn't Word aligning Justified pasted text from a PDF?

I copied and pasted the first few paras. from this PDF. Pls see screenshots below. After I clicked to align justified, why didn't each line automatically fill up to the end?
user avatar
6 votes
4 answers
21k views

remove newlines from a .txt file with a simple cmd command?

How do I remove newlines from a .txt file with a simple cmd command? This will erase the file: findstr "{\r\n}" %USERPROFILE%\Desktop\tt\t.txt %USERPROFILE%\Desktop\tt\t.txt > t.txt Whereas this ...
Elisha Habinsky's user avatar
4 votes
3 answers
17k views

How to paste from Notepad into Word without getting extra line breaks after every line

When I copy text from Notepad and paste it into Microsoft Word (2016) there is an extra line break after every single line. How do I prevent his from happening? I found a way to delete all blank ...
JasonG's user avatar
  • 41
0 votes
1 answer
577 views

Cygwin EOL Windows

I am trying to remember how to configure Cygwin to use windows EOL instead of Unix EOL. I haven't had to do this in years and I just bought a new laptop. NOTE: Bear with me as I describe the issue. ...
Ivan Ho's user avatar
2 votes
1 answer
2k views

handling of space and newline

Assuming user has 5 processes started, what is queried with below sentences: cuser=`whoami` a="`ps -C process -o user= | grep $cuser`" echo $a user user user user user vs. echo "`ps -C process -o ...
user1070696's user avatar
0 votes
2 answers
315 views

(Notepad++) Delete text between brackets but not from all brackets

So I posted a question earlier and got answered by user Dmytro Dzyubak, everything worked, but now I'm trying to make it work faster. More details below. Before: SkinMesh { skin = "Art/Models/...
Neathis's user avatar
2 votes
2 answers
24k views

Deleting text between brackets in notepad++

I need to delete everything between {} example below Before: ParticleEffects { animation = "distort" 0 = "mid Metadata/Effects/misc/distort/distort.pet" } After: ParticleEffects { } ...
Neathis's user avatar
  • 23
1 vote
2 answers
66 views

Using Notepad++ is it possble to create a shortcut to add 2 blank lines indented 4 spaces?

I'm working with Python, and while I use PyCharm, sometimes I need to use NotePad++. Is it possible to create a shortcut to add 2 new blank lines, preferably indented 4 spaces? I'm aware of Ctrl+Alt+...
user avatar
0 votes
0 answers
61 views

Find all files with inconsistent newlines

I have a directory with a large number of files (in various subdirectories) and I need to find all files that have inconsistent newlines (i.e. a mixture of Windows and Unix line endings). How could ...
J Fabian Meier's user avatar
0 votes
2 answers
258 views

Is sed buggy when pattern is newline for a delete command?

My goal is to print the content of a file up to (and excluding) a specific pattern and I'm using the following which works as expected (even when pattern is ^$): sed -n '/pattern/!p;//q' file In ...
Paolo's user avatar
  • 45
0 votes
1 answer
103 views

Why so many line feeds in a mysql file?

cat -A dfs.MYI M-~M-~^G^A^@^@^AT^@M-0^@d^@M-D^@^A^@^@^A^@^X^A^@^@^@^@^@M-^?^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?^@^@^@^@^@^@^D^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
scrapy's user avatar
  • 163
7 votes
2 answers
3k views

docker exec messes up terminal line feeds?

When I pipe the output from docker exec to another command, it appears to mess up my terminal's line endings. For example: $ docker exec -it foo sh -c 'echo {\"a\":\"b\",\"c\":\"d\"}' | jq { "a": ...
Roger Lipscombe's user avatar
0 votes
3 answers
11k views

How to search for strings that include newlines in Notepad++

I'm going through subtitle files so there are stuff like 442 00:24:18,017 --> 00:24:20,551 Now you're just looking for a scapegoat. and I'm wondering how I can search for "just looking for a"...
user1021085's user avatar
0 votes
1 answer
824 views

One newline equals two newlines in bash?

So while i was testing a python program i have been working on i noticed that echo -e "\n" and printf "\n" according to the if statement in bash. Even though echo -e "\n" prints two newlines (it ...
Javad's user avatar
  • 5
16 votes
2 answers
2k views

PuTTY: connected to some Ubuntu server, sometimes stops going to a new line when pressing enter

I use PuTTY in order to SSH to some Ubuntu 14.04.4 LTS x64 server. Pressing the key ENTER causes the terminal to go to a new line. However, from time to time, some program outputs some text, and ...
Franck Dernoncourt's user avatar
0 votes
1 answer
736 views

Suppressing git EOL conversion for PDFs

I'm maintaining a git repository of PDFs, and I'm having trouble stopping gitr converting EOLs from CRLF to LF. As the repo is shared between a Linux and Windows, and contains Linux scripts, I've ...
Brent.Longborough's user avatar
0 votes
2 answers
2k views

Vbscript MsgBox newline from batch argument

test.vbs: wscript.quit MsgBox ("Hello"&vbNewLine&"World",0) works. prova.bat: WScript //Nologo Message.vbs "Hello"&vbNewLine&"World" 0 Message.vbs: wscript.quit MsgBox (wscript....
Riccardo La Marca's user avatar
0 votes
0 answers
938 views

Remove uneven line ending positions in MS Word

In the attached picture, you can see that each line of text ends abruptly in between without going to the end of the actual position where a line should end(the rightmost location). With formatting ...
daddyodevil's user avatar
1 vote
3 answers
1k views

Why is the output of this echo command over-running into multiple lines?

I have a directory of photos whose names are the time and date the photo was taken. E.g: ~$ ls directory -1 2003-09-15 03.30.33.jpg 2004-05-04 12.45.28.jpg 2004-05-04 12.45.51.jpg However, if I run ...
Darren's user avatar
  • 2,756
4 votes
1 answer
5k views

Paste in Excel without splitting on newlines

I have some data in Google Sheets that has newlines in cells. When I paste into Excel the data is split into rows at those newlines and the other columns remain blank on the "inserted rows". How to ...
emanuel cristian Mocean's user avatar
0 votes
1 answer
835 views

Document saved with Notepad has linebreaks deleted

A very odd situation is occurring: (Running Windows 7 Enterprise, SP1, 64bit) A GUI I use at work (built specifically for this purpose and intended to run in a Windows environment) generates .dat ...
BunnyKnitter's user avatar
1 vote
1 answer
7k views

adding new line with text at the bottom of every opened files in notepad++?

I want to add text at the bottom of every opened file (as a extra line) in notepad++. I know how to add at beginning of the file. Find what:- (?s).* Replace with:- YOUR TEXT\r\n$0 which helps me ...
Abd's user avatar
  • 119
1 vote
1 answer
7k views

How to add new line character in notepad++ like one would do in Vim?

I have a bash script which parse text files. In these text files some lines contains a new line character, when I open the file with Vim it looks like this: data 1=part 1 ^M part 2 data 2=part 1 I ...
statox's user avatar
  • 149
0 votes
1 answer
2k views

Strange behavior in plain text file in notepad?

I Just received the txt file, and it looks good like this, But when I pasted it in my cisco device it did't load properly , First I did't get it because text looks okay, then for just curiosity, I ...
R__raki__'s user avatar
  • 101