[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MANIFEST.MF dos2unix issues

Posted on 2006-07-03
7
Medium Priority
?
684 Views
Last Modified: 2010-04-22
Hello!
I have a lot of jar files which I am transferring to unix. The issue is that the "MANIFEST.MF" is getting transferred with "^M" characters for each end of line in the file. Usually there is a tool which converts the Dos file format to unix and no "^M" character is added. But in this case there is no such tool provided. It is impossible to unjar each package and use this script:

dos2unix MANIFEST.MF MANIFEST.MF

Which converts the dos format file to unix file format.

Is there any other way of doing this. Thank you in advance. Urgent response will be much appreciated:)

Thank you
0
Comment
Question by:atwork2003
[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
  • 3
  • 3
7 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 2000 total points
ID: 17034392
You can use "sed" or "tr" to do the job, eg:

sed 's/^M//g' file > newfile
mv newfile file

Or

tr -d '\015'  <file >newfile
mv newfile file
0
 

Author Comment

by:atwork2003
ID: 17039980
Sorry if my question is confusing but I think u r converting one file at a time, right. If so I am already doing it. How do I convert more than one file at a  time.
Thank you
0
 
LVL 38

Expert Comment

by:yuzh
ID: 17040077
You can put all the file names in a text file and make it looks like:

file1
file2
filen

named the file as filelist

then do:

for FILE in `cat filelist` ; do
    tr -d '\015'  <$FILE >${FILE}.tmp
    mv ${FILE}.tmp $FILE
done

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 38

Expert Comment

by:yuzh
ID: 17096295
Hi atwork2003,
        Why a C grade? please have a look at the following page to learn
how to grade at EE, thank you!
        http://www.experts-exchange.com/help/#hi73
0
 

Author Comment

by:atwork2003
ID: 17116646
yuzh, sorry about this. I gave C grade because my question was to get all the files converted (files with M^) with some sort of command without having to convert file one by one. dos2unix was fine but it can be used on every file individually. I think your answer was doing the same thing. Correct me if I am wrong. It was not answer to my question. So i thought, may be you can not convert file altogether.

I appologize for this, let me see how I can get it back to A.

I just saw your last comment, I am not at work but I think this is a good idea. thank you and again sorry for the grading.
0
 

Author Comment

by:atwork2003
ID: 17116655
I am opening a question about how to change the Grade, pls bear with me. thank you
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
Suggested Courses

656 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