Skip to content

Instantly share code, notes, and snippets.

@pepelsbey
Created November 3, 2012 05:16
Show Gist options
  • Select an option

  • Save pepelsbey/4006131 to your computer and use it in GitHub Desktop.

Select an option

Save pepelsbey/4006131 to your computer and use it in GitHub Desktop.
SVG to SVGZ and back
# Functions
svgz() {
gzip $1 -S z
}
svg() {
file=$1
name=${file%.*}
mv ${file} ${name}.svg.gz && gunzip ${name}.svg.gz
}
# Aliases
alias svgz=svgz
alias svg=svg
@pepelsbey

Copy link
Copy Markdown
Author

svgz picture.svg now gives you picture.svgz and svg picture.svgz gives you picture.svg

@tonyganch

Copy link
Copy Markdown

А зачем алиас svgz=svgz?

@2bj

2bj commented Nov 3, 2012

Copy link
Copy Markdown

Тут алиасы вообще не нужны :)

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