Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- [ $# -ge 2 ] || exec echo "Usage: $0 <destdir> <file1.pst> <file2.pst> ..."
- dst="$1"
- mkdir -p "$dst" || exec echo "Can't create $dst"
- [ -d "$dst" ] || exec echo "$dst: not a dir"
- convertPst() {
- local u d=pst-$$
- echo "Converting $2..."
- mkdir $d
- readpst -q -t e -o $d "$2"
- u="${2##*/}"
- u="${u%.*}"
- mv $d "$1/$u.sbd"
- >"$1/$u"
- }
- shift
- for i; do
- convertPst "$dst" "$i"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement