AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  dos to unix tool

    Posted Tue April 08, 2008 08:41 AM

    Originally posted by: capeme


    I was recently attempting to use a tool called cfg2html_aix_2.7a and apparently upon downloading it windows added some unreconized characters into script. It was recommended to me to run a tool called dos2unix against it. However I find no tool in AIX named that so I am wondering if anyone is familar with this tool and/or if there is a compatible one for AIX 5.3?
    #AIX-Forum


  • 2.  Re: dos to unix tool

    Posted Tue April 08, 2008 09:58 AM

    Originally posted by: tony.evans


    Your best bet is just to download the file correctly?

    How do you know windows added some unrecognised characters, what happens when you try and run it? How did you download it? If you downloaded it via Windows how did you then get it onto your AIX host?
    #AIX-Forum


  • 3.  Re: dos to unix tool

    Posted Tue April 08, 2008 05:54 PM

    Originally posted by: SystemAdmin


    Too late I am sure but this works for me
    $ tr -d'\r' < badfile > goodfile
    Make sure you don't set badfile = goodfile or you will get a blank file in return!
    #AIX-Forum


  • 4.  Re: dos to unix tool

    Posted Wed April 09, 2008 04:59 AM

    Originally posted by: KarlM


    if in its original state it is a UNIX script then use binary mode to transfer it to windows and then binary again from windows to your AIX target.

    Alternatively I'd expect it is just the ^M characters you need to remove so vi the file and enter
    :%s/^V^M//

    where ^V is ctrl-V and ^M is ctrl-M (Note you won't see the ^V)
    #AIX-Forum


  • 5.  Re: dos to unix tool

    Posted Wed April 09, 2008 08:54 AM

    Originally posted by: capeme


    Thanks for the tips. I will try them and post results.

    Message was edited by: capeme
    #AIX-Forum