Skip to content

Instantly share code, notes, and snippets.

@kun432
Created October 2, 2021 18:50
Show Gist options
  • Save kun432/2e490548bd8ac404ed87467a20aa32bc to your computer and use it in GitHub Desktop.
Save kun432/2e490548bd8ac404ed87467a20aa32bc to your computer and use it in GitHub Desktop.
virtualbox環境でvagrant upとかを並列で行う
#!/bin/bash
parallel=3
subcmds="$@"
vagrant status --machine-readable | \
perl -wnlaF"," -e 'print $F[1] if $F[2] =~ /metadata/;' | \
xargs -P${parallel} -I {} vagrant $subcmds {}
@kun432
Copy link
Author

kun432 commented Oct 2, 2021

$ ./vagrant-ctrl.sh up

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