Questions tagged [newlines]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
27 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:...
1
vote
1answer
24 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 ...
0
votes
2answers
50 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 ...
0
votes
2answers
73 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 ...
0
votes
0answers
65 views

Line Pay Simulation: How to fix the “Insufficient balance” error in the simulation

I have encountered a technical problem in simulation environment thanks to your help I have called api from https://sandbox-api-pay.line.me/v2/payments/request this is Line Pay simulation environment, ...
0
votes
1answer
67 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: (...
0
votes
0answers
34 views

join lines and newlines command for ffmpeg?

I am using FFMPEG to add text to video but am not managing how to skip lines/ add line breaks. I am looking forward to adding a text to the video but not all the text within the same as it is right ...
0
votes
1answer
37 views

Change row delimiter for a specific column in Excel

I have a excel file which contains data as below. +-------+----------+-------------------------+-----------+ | ID | Material | Description | Attribute | +-------+----------+------------...
0
votes
1answer
42 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 ...
2
votes
1answer
388 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-...
0
votes
1answer
1k 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 ...
0
votes
2answers
5k 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 ...
0
votes
2answers
166 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?
4
votes
4answers
5k 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 ...
3
votes
1answer
3k 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 ...
0
votes
1answer
324 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. ...
1
vote
1answer
31 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 ...
0
votes
2answers
75 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/...
1
vote
2answers
6k 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 { } ...
1
vote
2answers
57 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
20 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
2answers
175 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
1answer
95 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^@^@^@^@^@^@^@^@^@^@^@^@^@^@...
4
votes
2answers
2k 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
4k 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
493 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
302 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
1k 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
452 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
188 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 ...
2
votes
0answers
1k 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
400 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
4k 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
4k 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
1k 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 ...
8
votes
4answers
24k 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
44 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
389 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
1k 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
83 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 ...
8
votes
2answers
17k views

Replace with a newline

Geany, like many text editors, has a replace dialog: In the Replace with: field, how can I express that I want the pattern to get replaced with a new line character?
1
vote
1answer
10k 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
1k 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 ...
13
votes
2answers
17k 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 ...
1
vote
1answer
605 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
853 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
1k 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
3k 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
47 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 ...