?
Solved

Problem reading uploaded file

Posted on 2002-04-15
1
Medium Priority
?
177 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 120 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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

770 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