Solved

Problem reading uploaded file

Posted on 2002-04-15
1
175 Views
Last Modified: 2010-04-20
Hi,

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?

Thanks
0
Comment
Question by:choccarlm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 40

Accepted Solution

by:
jlevie earned 30 total points
ID: 6941963
Try:

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.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

739 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