Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- pw="password"
- year="2015"
- for i in *.PDF
- do
- #remove password
- qpdf --password=$pw --decrypt $i $i.nopass.pdf
- #convert to ps for formating
- pdf2ps $i.nopass.pdf
- #generating text output and formatting into columns
- output+="$(ps2txt "$i.nopass.ps"|\
- grep -e "\/$year" -e 'DIRECT'|\
- tr '\n' ' '|\
- sed "s/** DIRECT DEPOSITS//g")|"
- clear
- echo "$output"|tr '|' '\n'|column -t
- rm "$i.nopass.pdf"
- rm "$i.nopass.ps"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement