Problem reading uploaded file

Posted on 2002-04-15
Medium Priority
Last Modified: 2010-04-20

I use Microsoft access to build a config file to my desktop, which I then upload to my server. This file then gets used by a web page, which uses it as part of it's config. However, the web page is having problems reading this file. Somebody I used to work with told me that it was because the file has windows formatting in it, and this needs to be removed. He gave me some code, and it worked, but I've lost it.

I think the code was something like the following:

sed 's/^M//' < /home/user/config_file > /var/config_file

But this doesnt seem to be working. Any ideas?

Question by:choccarlm
1 Comment
LVL 40

Accepted Solution

jlevie earned 120 total points
ID: 6941963

tr -d '\r' </home/user/config_file > /var/config_file

if the DOS line terminator is the problem that will remove the carriage returns from the file.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy. ┬áThis article also serves as your NTP server documentation.
Virtualization software lets you run different versions of Windows, Ubuntu Linux and other versions of Linux all at the same time, rather than running each one directly from your computer's hard drive.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question