LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Richard Herveille<richard@h...>
    Date: Fri Jan 28 16:11:27 CET 2005
    Subject: [openrisc] Re: OpenRISC Digest, Vol 14, Issue 8
    Top
    If you're on a unix style machine, this tool is pre-installed.

    dos2unix
    unix2dos

    Richard

    > -----Original Message-----
    > From: openrisc-bounces@o...
    > [mailto:openrisc-bounces@o...] On Behalf Of windsoul smth
    > Sent: Friday, January 28, 2005 1:02 PM
    > To: openrisc@o...
    > Subject: [openrisc] Re: OpenRISC Digest, Vol 14, Issue 8
    >
    > the configure script error is because the defference of the "new line"
    > between windows and linux. one is "0d0a" while the other is
    > "0d", this is a small tool i found on www.tcl.tk to convert
    > whole directory from one format to another:
    > http://www.tcl.tk/scripting/Dos2unix.txt
    >
    > be careful for it will also convert binary files the source
    > of the file is:
    >
    > #!/usr/local/bin/tclsh8.0
    >
    > # Dos2Unix
    > # Convert a file to Unix-style line endings
    > # If the file is a directory, then recursively
    > # convert all the files in the directory and below.
    > #
    > # Arguments
    > # f The name of a file or directory.
    > #
    > # Side Effects:
    > # Rewrites the file to have LF line-endings
    >
    > proc Dos2Unix {f} {
    > puts $f
    > if {[file isdirectory $f]} {
    > foreach g [glob [file join $f *]] {
    > Dos2Unix $g
    > }
    > } else {
    > set in [open $f]
    > set out [open $f.new w]
    > fconfigure $out -translation lf
    > puts -nonewline $out [read $in]
    > close $out
    > close $in
    > file rename -force $f.new $f
    > }
    > }
    >
    > # Process each command-line argument
    >
    > foreach f $argv {
    > Dos2Unix $f
    > }
    > _______________________________________________
    > http://www.opencores.org/mailman/listinfo/openrisc
    >

    ReferenceAuthor
    [openrisc] Re: OpenRISC Digest, Vol 14, Issue 8Windsoul smth

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.