This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Give back only the basename without using `basename` (i.e. in scripts) | |
filestring=blurps.pdf | |
echo ${file%.pdf} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# compress PDF. Needs ghostscript package. | |
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -DBATCH -sOutputFile=out.pdf in.pdf | |
# compress all PDFs in dir | |
for file in `ls *.pdf`; | |
do | |
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -DBATCH -sOutputFile=${$file%.pdf}-c.pdf $file | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -v '^$' #remove empty lines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Use the bash instead of my standard shell as most scripts are based on it | |
set shell=/bin/bash | |
set t_Co=256 " 256 color mode | |
set encoding=utf-8 " always use utf-8 | |
set mouse=a " enable mouse usage | |
set nocompatible " should be auto-on, but to be sure... | |
set number " Numbering on left side. | |
set relativenumber " Sets numbers relative to the current line | |
au InsertEnter * :set nu " Enter absolute number mode in insert mode | |
au InsertLeave * :set rnu " relative ... in normal mode |