Questions tagged [lf]

Line Feed is a special character (unicode U+000A).

Line Feed is a special character (unicode U+000A), (ASCII: '\n', 0x0A, 10 in decimal). Line feed (LF) and carriage return (CR) are closely associated to represent end of line (EOL).

79 questions
2
votes
2 answers

Remove line feed (LF) from XML node using XSLT

I have the following in an XML node: XXX YYY ZZZ (as you can see there is a line feed) My XSLT is really simple: How can I remove the line feed using XSLT?
user412045
2
votes
2 answers

Removing line feeds from file is not working

I trying to use sed to remove the linefeed from lines that contain a pattern. My lines are: Format: 0000000 InputMask: &&&&&&& OrdinalPosition: 0 …
C0ppert0p
  • 634
  • 2
  • 7
  • 23
2
votes
1 answer

How to commit files to git with line separator changed (getting 'nothing to commit')

I need to update some files for a pull request so that they have matching line separators to the rest of the project. I've changed these files from LF to CRLF in notepad++ (couldn't figure out how to do it in intellij), now I'm trying to commit this…
2
votes
2 answers

R equivalent for .NET's Environment.NewLine

Is there an R equivalent for Environment.NewLine in .NET? I'm looking for a character object that would represent a new line based on the environment, e.g. CR LF ("\r\n") on Windows and LF ("\n") on Unix. I couldn't find any such thing in the R…
Narvarth
  • 495
  • 4
  • 13
2
votes
1 answer

Is there an advantage to using LF over CRLF?

I created two files containing one line of identical text. One file was set to the LF newline, while the other was set to use a CRLF newline. The file using LF as the newline character was 1 byte smaller. When writing large programs, is there an…
user7691151
2
votes
1 answer

Git : Self-made file has line-ending problems

So, I have this new repo where I'm trying to start a collaborative project. I have already pushed .gitignore and .gitattributes (handling auto-crlf) files to it. My .gitattributes file is: # Set the default behavior, in case people don't have…
2
votes
2 answers

"Please make sure all files only have LF endings" error when pushing to a GitHub repo

I am new to Git. I forked a repo, created a branch, made some changes, committed and then when I push (git push origin master), I get the following error : Starting Pattern Checks .gitattributes --> Please make sure all files only have LF…
user2125722
  • 1,289
  • 3
  • 18
  • 29
2
votes
1 answer

Git repository with both CRLF and LF files?

I have a git repository whose files' line endings should be CRLF or LR on the checkedout depending on the specific file. For instance, I want that all *.sh files to be checked out with LR line endings while all *.bat files with CRLF. I've been…
Storo
  • 988
  • 1
  • 7
  • 31
2
votes
1 answer

Powershell and .txt format

Cisco SX20 systems allow you to access their Web interface and download a backup of their configuration in a .txt file. I can open the file and manually change settings, then re-upload the file with no problems. Now, I have a Powershell script that…
Blake
  • 29
  • 6
2
votes
2 answers

Configure git repository so that all files are stored with line-ending LF (not CRLF)?

For a specific github repo ( only ) I need to make sure that all text files pushed have LF line-ending ( not CRLF ). Further, pulled-down repo files should retain LF line-ending on clients either OSX or Windows. Is this possible ?
BaltoStar
  • 8,165
  • 17
  • 59
  • 91
2
votes
1 answer

How can I migrate a git repo from Windows to Linux? (CRLF - LF issue)

I started a git repository on a Windows machine, and then I changed to a Linux machine. Everything is working fine, but every time I commit, I get the warning warning: CRLF will be replaced by LF in [file]. I know I can set auto conversion off but,…
vguzmanp
  • 785
  • 1
  • 10
  • 31
1
vote
1 answer

Does text=auto in .gitattributes always enforce LF line endings and ignore Git's core.autocrlf and core.eol settings?

This is essentially a follow-up to the question asked here about the difference between * text=auto and * text=auto eol=lf in a .gitattributes config: What is the difference between "* text=auto" and "* text=auto eol=lf"? I think I understand how…
1
vote
2 answers

/bin/sh^M: bad interpreter: No such file or directory error caused by different GIT env configs overriding each other?

A build script I wrote is failing on a ci/cd pipeline (that runs in linux) because somehow the build.sh script got converted/save in CRLF format (based on what i gather online), leading to this error: /bin/sh^M: bad interpreter: No such file or…
JohnDoeDeer
  • 85
  • 1
  • 11
1
vote
1 answer

diff and patch using wrong line ending when creating new files or line end changed

I'm trying to create a patch using diff, but I can't get the patch to use the line end characters used in the files when creating a new file or to change the line ending when the file changes it. Basically, I'm doing: cp -r dir1 dir3 diff -ruN dir1…
Jordan Evens
  • 405
  • 1
  • 4
  • 14
1
vote
1 answer

How to work if Linter throws error at every line?

Trying to work on a project, but I cannot commit because some Linter is under use. It throws errors like: Expected linebreaks to be 'LF' but found 'CRLF' I tried to follow the instructions at How do I force git to use LF instead of CR+LF under…
Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175