Skip to content

Instantly share code, notes, and snippets.

@drhirsch
Last active April 5, 2024 07:37
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save drhirsch/e0295105a36039aa38ce936f39b26301 to your computer and use it in GitHub Desktop.
Save drhirsch/e0295105a36039aa38ce936f39b26301 to your computer and use it in GitHub Desktop.
Install GNU Parallel on any system including Cygwin
#!/bin/bash
# useful for platforms such as Cygwin that don't currently have GNU Parallel in their repo.
# prerequisite: make
(
wd=$(mktemp -d)
wget -nc -P $wd ftp://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2
cd $wd
tar -xf parallel-latest.tar.bz2
cd parallel-*
./configure && make && make install
)
@samd1993
Copy link

How would I run this in Git Bash?

@scivision
Copy link

scivision commented Jun 30, 2020

I have not tried this on Windows Git Bash. Perhaps consider Windows Subsystem for Linux

@ole-tange
Copy link

ole-tange commented Jul 14, 2020

Try:

$ (wget -O - pi.dk/3 || lynx -source pi.dk/3 || curl pi.dk/3/ || \
   fetch -o - http://pi.dk/3 ) > install.sh
$ sha1sum install.sh | grep 67bd7bc7dc20aff99eb8f1266574dadb
12345678 67bd7bc7 dc20aff9 9eb8f126 6574dadb
$ md5sum install.sh | grep b7a15cdbb07fb6e11b0338577bc1780f
b7a15cdb b07fb6e1 1b033857 7bc1780f
$ sha512sum install.sh | grep 186000b62b66969d7506ca4f885e0c80e02a22444
6f25960b d4b90cf6 ba5b76de c1acdf39 f3d24249 72930394 a4164351 93a7668d
21ff9839 6f920be5 186000b6 2b66969d 7506ca4f 885e0c80 e02a2244 40e8a43f
$ bash install.sh

It should work in Microsoft Windows Git Bash, too.

@scotty6435
Copy link

Wget is not available on git bash so that command also fails

@scivision
Copy link

scivision commented Sep 21, 2022

@danthemango
Copy link

Wget is not available on git bash so that command also fails

MINGW (and therefore git-bash) has wget available for install:

  • try running /c/MinGW/bin/mingw-get.exe in git bash and it should open the MinGW Installation Manager
  • scroll down to "msys-wget" and right click the one with Class "bin"
  • select "Mark for Installation"
  • on the top click "Installation"
  • select "Apply Changes"
  • click "Apply"
  • close the install manager, restart git-bash, and try running wget

@ole-tange
Copy link

It is unclear to me why @scotty6435 believes the command will fail just because wget is not installed:

(wget -O - pi.dk/3 || lynx -source pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3 ) > install.sh

As long as you have just one of wget, lynx,curl, or fetch installed it should work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment