Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [newlines]

The tag has no usage guidance.

1
vote
2answers
50 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+...
0
votes
0answers
13 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 ...
0
votes
0answers
117 views

Word adding extra blank lines to header and footer

I'm using 2016 Word and Windows 7, building horizontal tables--nothing too complex, mostly words inside the table cells. I have defined a header and footer. As I add text to the document, Word ...
0
votes
2answers
82 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 ...
0
votes
0answers
37 views

SQL Compare 13, copy & paste from differences SQL View doesn't copy carriage return/newline?

I'm using SQL Compare 13 to compare a test and production database. Sometimes there are tiny differences and I just copy & paste it from the differences SQL View and run it in the target database. ...
0
votes
1answer
85 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^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
0
votes
0answers
239 views

How to prevent GIT Diff to compare similar lines distinct only by \r\n?

I would use GIT DIFF to compare change between 2 files. To do that, I use following command git.exe diff --ignore-all-space --ignore-blank-lines --diff-algorithm=minimal --no-index ./...
3
votes
2answers
746 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": ...
0
votes
3answers
1k 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"...
0
votes
1answer
285 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 ...
16
votes
2answers
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 ...
0
votes
1answer
68 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 ...
0
votes
2answers
597 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....
0
votes
0answers
194 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 ...
1
vote
3answers
113 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 ...
1
vote
0answers
476 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 ...
0
votes
1answer
167 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 ...
1
vote
1answer
2k 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 ...
1
vote
1answer
2k 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 ...
0
votes
1answer
828 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 ...
5
votes
4answers
11k views

Prevent Outlook from adding line breaks

In my Outlook messages recently I have noticed that there are added line breaks after a certain number of characters. I suspect that these are being added to my outgoing messages only, not inbound ...
0
votes
1answer
43 views

Forgot line break. Split line by number of columns

I am sending a single line of output (from some cluster jobs) to a file. The output has a defined number of columns, but I forgot to add a line break at the end of each line, so all my input is being ...
2
votes
1answer
84 views

How to specify semi colon character ';' as a line ending character when importing CSV to Excel on Mac

(Using Microsoft Excel form Mac version 15.18) Can see delimiters for the columns in the import steps, but no-where is there an option for defining what the line ending character is. I need this so ...
1
vote
1answer
597 views

Windows CMD.exe inserting new line after program runs

Does CMD.exe automatically put a new line on the terminal window after a program has run? My program is outputing one line of text, via .NET Console.WriteLine("TEXT"); However, I'm also seeing a blank ...
0
votes
1answer
63 views

Wrap lines in vim's scratch buffer but not elsewhere

I have set nowrap in my vim config file but there's one place where I need line wrapping: the scratch buffer (because the text that shows up there usually doesn't stick to 80 columns). Is there a ...
7
votes
1answer
9k views

Replace with a newline

Geany, like many text editors, has a Replace dialog: In the Replace with: field, how to express that I want the pattern to get replaced with a new line character?
1
vote
1answer
6k views

NodeJS: writing JSON file not having line breaks when i open in Notepad. But is pretty view with other Editors

I am writing a JSON file using NodeJS, like this: var path = "D:\\test.json" var writeContent = {"Success" : "This is a sample"} fs.writeFile(path, JSON.stringify(writeContent, null, 4), function (...
3
votes
2answers
527 views

Is there a way to echo a blackslash followed by newline in bash?

I’m trying to terminate a line with \ and have something else on a new line. At first I did this but it just prints the \n: $ echo -e "Test\\\nNewline" Test\nNewline I tried this way but it add a ...
10
votes
2answers
9k views

How do I interactively type \r\n-terminated query in netcat?

$ nc example.com 80 GET / HTTP/1.1 Host: example.com HTTP/1.1 200 OK ... It works, line separator is just 0A here instead of required 0D0A. How do I type a 0D0A-separated query in netcat? It is ...
0
votes
1answer
414 views

Change line endings and encoding of file at the same time

I have some files with Windows line endings and latin-1 encoding that I need to convert to unix line endings and utf-8. Of course I can for file in ./*.csv; do sed s'/^M//' "$file" > "${file}....
2
votes
1answer
591 views

How to create a single GnuPG signature which works on both LF and CR/LF versions of a file?

I created a text file using only LF (line feed) at the end of each line. I then made a version of it which was identical, except it had CR/LF (carriage return / line feed) at the end of each line. ...
0
votes
2answers
632 views

Add a newline after each terminal command except at the beginning

I want to add a newline after every command I enter in the terminal. Right now, I have this line in my .bash_profile file: export PS1="\n\u$ " This works as expected: However the issue with this ...
6
votes
1answer
2k views

What is Caret-At (^@) under emacs?

I'm use to seeing Caret-M (^M) under Emacs. But below, I'm seeing Caret-At (^@): The file was created by running the Crypto++ test program on OpenBSD with the command ./cryptest.exe > cryptopp.txt....
0
votes
1answer
37 views

Sometimes my terminal screws up newlines after killing a process

When I fire up a new terminal, this is usually what it can look like: $ echo "test"; echo "blaat" test blaat But sometimes after having run a process in the terminal that I killed with SIGKILL, my ...
0
votes
1answer
664 views

Line Manipulation Reformat text Notepad++ or PSPaD

I have about 40,000 lines I need to look like first line - no paragraph marks. The trouble is, I can't use join lines then use (\d\D+)& $1\n to get like line 1 because of numbers inside of ...
0
votes
1answer
262 views

Newline command does not work in latex formula in Libre Office

I am using Libre Office Writer 4.2.8.2 in Ubuntu 14.04. When I select Insert->Object->Formula and write some formula like <some formula> newline <some formula> it renders as <some ...
0
votes
1answer
1k views

How can I paste newline-separated text into a bulleted list without creating new bullets?

I have a bulleted list in an Outlook 2010 email and I am trying to paste a newline-separated list of text items into one of the bullets. When I do this, it's bulleting each line and I don't want it ...
1
vote
4answers
4k views

Multiline && combinator operator for command chaining in batch file

I see that this operator is used in windows (and might be Linux?) to chain/combine multiple commands in one line. Commands are executed one after another, as long as preceding complete successfully (...
1
vote
2answers
30k views

Find and replace notepad++ with wildcards

I've read about 15 tutorials on regular expression however I'm clearly not getting as I've been unable to tailor it to my problem. I have one set of code which would be found in many different ...
2
votes
1answer
4k views

NotePad++ - How to remove or replace newline characters?

Within my notepad++ environment, I have the following value on a page... test me out </li> I can search and find the ending </li> value with.... \n</li> but what do I need to ...
5
votes
1answer
4k views

Preserving newline in find/grep search results

I am recursively searching for the occurrence of php scripts being called from other files using the following script. find . -exec grep -Hn $1 {} \; | grep -v ^Binary; Works great! Now, I need the ...
2
votes
0answers
76 views

Newlines in description of imported csv in Outlook Calander

I have exported a list of birthdays from excel to csv. Now I want to import them in Outlook as calander items. Everything works fine exept I can't do newlines in the desciption. I've already tried to ...
1
vote
1answer
1k views

Unix2Dos: can't stat - what does this mean, why does it happen?

I've got a txt file that has Unix newlines and needs to have Windows newlines. I try to do unix2dos filename.txt but I get Unix2Dos: Can't stat 'filename.txt'. In fact, it says Can't stat 'xxx' for ...
1
vote
2answers
190 views

How do I output a variable without changing if it has a newline or not in a shell script?

I have a shell script that takes input from another shell script. The stream gets piped in on stdin. I need to capture all the bytes of the stdin stream to a single variable in the shell script. Then,...
0
votes
1answer
947 views

What is the easiest way to convert a bunch of text files from LF (Unix) to CRLF (Windows) in a single run? [duplicate]

There is a directory tree on a Windows7 machine containing a few hundred text files that I want to convert from LF to CRLF. I already found a Win32 version of UNIX2DOS but that one accepts only one ...
1
vote
2answers
6k views

What should I do with the newlines in this CSV file so it will import properly into a database or spreadsheet?

I have a .csv file which was exported from a proprietary electronic health records database system. I was a subscriber to their service but upon ending my subscription this is how I get to keep my ...
3
votes
2answers
143 views

Match cell content based on line break

I take data from a helpline call in site and transfer it to Linux Libreoffice Calc (LC). Column C cells have 2 sets of data - two telephone numbers - 1 being the caller and 1 being the forwarded ...
2
votes
2answers
1k views

Vim: How to append even lines to odd lines

I have the following lines. 1 4 2 10 3 20 4 35 5 56 ... ...(many more lines after this) And I want to change to the following in Vim. 1 4 2 10 3 20 4 35 5 56 ... ... How can I achieve this?
0
votes
1answer
49 views

How to merge specific lines and remove specific newlines from a text that's in the form of a changelog, using vim?

I have a changelog that's like this: version 1.90 (1 newline) Released on 27 April 2014 (2 consequent newlines) Added feature x ---> (first entry for 1.90) (1 newline between ...
17
votes
4answers
6k views

Why is Vim adding a newline? Is this a convention?

If I open Vim and type itest<Esc>:wq then I get a file that has no newlines in Vim but does seem to have a newline in the code: $ vim -u NONE test.txt $ cat test.txt | hd 00000000 74 65 73 74 ...