Solved

Problem reading uploaded file

Posted on 2002-04-15
1
171 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
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
parse convert xml feed to text (python) 2 65
Video Streaming 6 52
Steps to follow for Maintenance of Servers 4 49
how to rebuild XFS volume from LV 19 27
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…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

943 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

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now