Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: zzapper Subject: Converting Dos Slashes to Unix Slashes Date: Sat, 13 Mar 2004 20:10:30 +0000 Lines: 33 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: cpc3-oxfd4-4-0-cust194.oxfd.cable.ntl.com X-Newsreader: Forte Free Agent 1.93/32.576 English (American) hi, I thought I'd write a simple script to allow me to cd to a DOS path that I had in my paste buffer, turned out to be tricky alias doscd='. doscd' #!bash # doscd # description : convert dos paths result=$(echo $1 | sed "s/\\\/\//g") \cd $result > doscd "c:\temp\fred" That more or less works but I have to quote the "Dos path" and it freaks out if a directory begins with a eg > doscd "c:\aaa\" Cannot find c:/aa/ Cygpath hardly helps because I'd need to backslash (no gain) cygpath --unix C:\\cygwin\\bin\\cygwin.bat Any ideas?1? zzapper (vim & cygwin & zsh) -- vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?" http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/