linuxbashcaffe

How to get Linux command line functions for Windows?


I am following Caffe on this tutorial. I am using Windows so I don't have the Linux functions. Is there an easy way I can get Linux functions ? When I run the shell script it launches Bash which immediately closes. It doesn't seem to download anything.

#!/usr/bin/env sh
# This scripts downloads the mnist data and unzips it.

DIR="$( cd "$(dirname "$0")" ; pwd -P )"
cd "$DIR"

echo "Downloading..."

for fname in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte
do
    if [ ! -e $fname ]; then
        echo "done"
        wget --no-check-certificate http://yann.lecun.com/exdb/mnist/${fname}.gz
        gunzip ${fname}.gz
        echo "done"
    fi
done

Solution

  • You can consider installing such an environment, e.g. start with CYGWIN: https://www.cygwin.com/