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
0
votes
2 answers

How to convert dos2unix csv file with python script

I want to convert a csv file into dos2unix format using python in windows. Rightnow I am doing manually by placing csv file in workarea(server) and run command in putty.[Command : dos2unix file_received filename]
0
votes
2 answers

How to remove ^M special character in VI mode - Can't remove using dos2unix, can't print the whole line doing cat or grep

Linux: RHEL5 Tikanga Version: 2.6.18-402.el5 (per uname -a) I'm creating a file by grepping some line from a windows source file (which contains some Version=x.x.x value) and putting it to new file aa.txt. This works fine for finding and grepping…
AKS
  • 14,113
  • 34
  • 144
  • 227
0
votes
2 answers

How do I pipe `dos2unix` into `while read` in bash?

Right now, I'm trying to fix an issue in my PrintBans.sh script. The problem is, the program that generates this file saves it with \r\n line endings, so I need the while loop to be able to read \r\n lines, otherwise there's an extra \r at the end…
PatPeter
  • 173
  • 12
0
votes
0 answers

HADOOP on WINDOWS error finding hostname $'hostname\r' with start-dfs.sh Name or service not known hostname

I am installing Hadoop on window 7 64bits with Cygwin. After I format the Hadoop successfully, I want start it use the command: start-dfs.sh. but it reports as: ]tarting namenodes on [DATASCIENCES01 : Name or service not knownstname…
Cielronix
  • 1
  • 1
0
votes
3 answers

How to run the dos2unix command on files inside multiple folders and sub-folders?

I want to run the dos2unix command on all files inside a folder. The issue here is the folder contains files and sub-folders. The sub-folder again contains files and folders. So if I simply run user/bin/dos2unix , it will throw an error…
Ban Midou
  • 63
  • 1
  • 9
0
votes
2 answers

shell script to convert windows file to unix using dos2unix

I'm writing a simple shell script to make use of dos2unix command to convert Windows-format files to Unix format as and when it arrives in my folder. I used to use iconv in the script and automate it to get one encoding converted to the other. But…
mac_online
  • 165
  • 2
  • 13
0
votes
0 answers

How can I give permission to my python script programmatically

Whenever I write a new Python script in Windows, to execute it on UNIX I need to first give permission through chmod and then I have run dos2unix to make it executable. I don't want to run these commands. Is there any way to to add permission and…
gaurav bharadwaj
  • 1,503
  • 1
  • 10
  • 25
0
votes
0 answers

AES Decryption not working in unix server when encrypted file uploaded from Windows (Bouncy Castle)

One of our clients will upload a ENCRYPTED file in our application and we will move that file to our AIX server and decrypt it. The file is not getting decrypted properly. If I manually move the encrypted file through SFTP to the AIX server,…
saratbala
  • 29
  • 3
0
votes
1 answer

How to set umask and dos2unix when checking out on Linux?

How can I configure my svn client (/bin/svn) to check out files under a default permission setting (e.g. umask 0022 or chmod 755) as well as to instantly convert them from DOS file format? Currently, I do dos2unix.
amphibient
  • 25,192
  • 44
  • 130
  • 215
0
votes
2 answers

Concatenate three integer value UNIX

hi i am trying to concatenate three integer value in UNIX OS(SunOS 5.10). But it is not working for me . Below is the code a=2016 b=11 c=21 result="$a$b$c" echo "$result" OUTPUT-: 2016 11 21 Can anyone help???
Randomguy
  • 182
  • 1
  • 10
0
votes
1 answer

I would like to add ^M at the end of all row in CSV file

I have the CSV file that contains data around 100M rows and I would like to add ^M at the end of each row because if not have a ^M I cannot load the CSV file into the table(It just load only the 1st row and then ignore another row). I tried to add…
user7333846
  • 79
  • 3
  • 9
0
votes
1 answer

Java Parsing Error when running program in Eclipse

I wrote an application in eclipse on Windows and i have moved it over to a Raspberry pi. now when i try to run the application from eclipse i get an error. /opt/jre/jdk1.8.0_101/bin/java: 1: /opt/jre/jdk1.8.0_101/bin/java: Syntax error: end of…
Display Name
  • 303
  • 4
  • 19
0
votes
0 answers

Removing ^M characters from all files inside the jar file

While transferring the project ear file from windows to unix, one of the jar file inside ear is modified, and all the files including files inside sub folders in the jar are added with (^M) characters. Need help in removing ^M characters from all…
0
votes
0 answers

dos2unix stopped working when started from crontab

Have got a shell script which has been running a couple of years without a problem. It's very simple - just runs dos2unix on some files, each time checking the exit code and aborting the script if $? is not 0. Wednesday last week dos2unix started…
0
votes
2 answers

How to add a column in a file whose values are equivalent to epoch conversion of one of the date colmn already in that file using unix commands?

Suppose I have a .txt file in my unix database : events.txt with 3 columns and 4 records as follow: Name DateofBirth City Alex 2016-02-22 15:12:21.244000 London John 2016-02-24 15:12:21.244000 …