Questions tagged [dos2unix]

About dos2unix conversion program

unix2dos is a Unix tool to convert an ASCII text file from DOS format (carriage return and line break) to UNIX format (line break).

Also see

90 questions
1
vote
1 answer

Using com.opencsv.CSVReader on windows stops reading lines prematurely

I have two files that are identical except for the line ending codes. The one that uses the newline (linux/Unix)character works (reads all 550 rows of data) and the one that uses carriage return and line feed (Windows) stops returning lines after…
Ron
  • 389
  • 1
  • 2
  • 7
1
vote
1 answer

Avoid needing dos2unix in php

We used to edit a payload script via the terminal on an old server. To ease up and avoid typos I'd like to design a php script that generates the payload, save it to a file and use the built-in FTP functionality in PHP to upload the file to the FTP…
EDP
  • 239
  • 6
  • 18
1
vote
2 answers

Git rebase applying dos2unix at each step

I've a series of commits to a file that I now realize was created with incorrect line endings. I want to rebase the commits and apply dos2unix command at each step. I can't see an easy way to do this as after each step git registers a full…
EoghanM
  • 20,021
  • 21
  • 80
  • 110
1
vote
1 answer

dos2unix support for file with unicode characters

i use dos2unix to remove control-m characters, i works fine for normal text file. But for text files with unicode characters it replaces all unicode characters with junk character. Please let me know how to use dos2unix for files with unicode…
Prasad
  • 459
  • 8
  • 21
1
vote
2 answers

Bash alias file corrupted: No such file or directory

I have/had ~/.bashrc_aliases.sh (a file containing bash aliases) sourced by my ~/.bashrc file. This ~/.bashrc_aliases.sh file somehow happened to be in DOS format which I fixed by running dos2unix on the file. When this alias file was in 'DOS'…
1
vote
2 answers

find grep exclude some file names for dos2unix

so far I have gotten this far: prompt$ find path/to/project -type f | grep -v '*.ori|*.pte|*.uh|*.mna' | xargs dos2unix 2> log.txt However, the files with extensions .ori, .pte, .uh and .mna still show up.
Sassinak
  • 75
  • 1
  • 11
0
votes
1 answer

How to run dos2unix on all files with all extensions in a directory and its sun-directories?

Say I am in a folder named Folder. This folder have several files with different file types, and several subfolders called, SubFolder1, SubFolder2, etc. Each of these subfolders have files and subfolders inside them. I want to run dos2unix on ALL…
0
votes
0 answers

Mac cannot read DOS files, must use dos2unix

A while ago I was messing around with my Mac settings in Terminal. Since then, I've had to use dos2unix (http://dos2unix.sourceforge.net/) on many files just to be able to run them. This includes files that my team create and push to a shared…
Daven
  • 531
  • 4
  • 10
0
votes
2 answers

Shell script for using dos2unix on directories and sub directories for KornShell

dos2unix takes filename as an argument. I need to make it generic so that it can take either a file or directories and then search recursively in directories and convert all files in the tree structure from dos to Unix. I am using KornShell…
ruby
  • 1
  • 1
  • 1
0
votes
1 answer

how can i activate dos2unix on files that loacated in google cloud using gsutil?

I have files in my GCP bucket and I am trying to activate dos2unix on those files. I couldn't find (after 1 hour of searching) any commands that allow me that. I try that: gsutil dos2unix gs://my-google-bucket/short_1000rows.csv but it didn't…
Pythonist
  • 27
  • 6
0
votes
1 answer

How do I replace "\r" line endings when running Docker script on Windows?

I'm using Docker 19 on Windows 10 (using Cygwin to run Docker). I have this web/Dockerfile ... FROM python:3.7-slim RUN apt-get update && apt-get install RUN apt-get install -y dos2unix RUN apt-get install -y libmariadb-dev-compat…
Dave
  • 17,420
  • 96
  • 300
  • 582
0
votes
0 answers

TPT10508: RDBMS error 3707: Syntax error, expected something like an 'ERRORFILES' keyword between the word

I am running the script below in DOS to load files from DEV TO PROD, I am having the error message (TPT10508: RDBMS error 3707: Syntax error, expected something like an 'ERRORFILES' keyword between the word 'INSERT INTO' and the word…
0
votes
0 answers

How can i send the output of an sql statement

I'm trying to make a script that sends mail to someone (with Unix) to receive the output of a statement. What I selected in that statement to send to the mail. I already have a connection made through Teradata, I kept trying to make this reference…
ferye21
  • 13
  • 7
0
votes
2 answers

dos2unix format conversion error while execution through TeamCity

While trying to transfer file from Windows to Unix Azure environment, I am getting error dos2unix format error dos2unix -o /xyz/home/ABC_efg.txt failed to execute dos2unix format change. I tried to run a PS script to fix it but does seem to work .…
Anupam
  • 212
  • 1
  • 12
0
votes
0 answers

makefile - no rule to make a target c

This case has been opened many times, I have checked up all of the answers but didn't really help. I'm posting it here may someone can help me. My working architecture is : | ( I'm Here ) +- matamzone.c +- amountset.c +- product.c +- order.c +-…