Skip to content

Instantly share code, notes, and snippets.

@mleuthold
Last active December 8, 2020 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mleuthold/44b8a94febe0663869c39e17571c7fd9 to your computer and use it in GitHub Desktop.
Save mleuthold/44b8a94febe0663869c39e17571c7fd9 to your computer and use it in GitHub Desktop.
Make parquet-tools available
alias parquet-tools="docker run --rm --workdir /data -it -v $(pwd):/data nathanhowell/parquet-tools"
### OR
grep -qxF "### PARQUETTOOLS BEGIN
### PARQUETTOOLS END" ~/.zshrc || echo "\n### PARQUETTOOLS BEGIN\n### PARQUETTOOLS END" >> ~/.zshrc
command='''
parquet_tools(){
docker run --rm --workdir /data -it -v $(pwd):/data nathanhowell/parquet-tools "$@"
}
''' perl -0p -i.bak -e 's/### PARQUETTOOLS BEGIN\n(.|\n)*### PARQUETTOOLS END/### PARQUETTOOLS BEGIN\n$ENV{command}\n### PARQUETTOOLS END/' ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment