Solved

Problem reading uploaded file

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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 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 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.:

762 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

21 Experts available now in Live!

Get 1:1 Help Now