X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: Yes, hits=6.6 required=5.0 tests=BAYES_50,BOTNET,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Message-id: <4F5D2408.6020904@jackson.io> Date: Sun, 11 Mar 2012 18:15:36 -0400 From: Ken Jackson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120217 Thunderbird/10.0.2 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Cygwin for Fedora? References: <4F586390 DOT 6080702 AT gmail DOT com> In-reply-to: <4F586390.6080702@gmail.com> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 On 03/08/2012 02:45 AM, Harry Simons wrote: > Basically, I want my scripts to be able to run flawlessly on both > Fedora and Cygwin/Windows systems. I have a universal .bashrc file that I use on Linux, Cygwin and the occasional FreeBSD or NetBSD systems. In it I make use of "uname -s" to handle peculiarities like this: case "$(uname -s)" in Linux) echo "Do Linux-specific stuff here" ;; CYGWIN*) echo "Do Cygwin-specific stuff here" ;; *BSD) echo "Do BSD-specific stuff here" ;; *) echo "No support for $(uname -s) yet" ;; esac I also have come to prefer the Cygwin "putclip" and "getclip" to the Linux "xclip". But not all platforms have both, so this portion of my universal .bashrc protects putclip/getclip if they exist or otherwise creates them out of xclip if it exists. if [ -n "$(type -P xclip)" ]; then test -z "$(type -P putclip)" && \ alias putclip="$(type -P xclip) -sel clip -i" test -z "$(type -P getclip)" && \ alias getclip="$(type -P xclip) -sel clip -o" alias xclip='xclip -sel clip' fi -Ken Jackson -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple