#cat pdfs page 1s to new file
cd ~/fay/2001/2001
mv A73557033.pdf ~/
pdftk A=~/A73557033.pdf cat A1 output ~/tmp.pdf
for i in $(ls ~/fay/2001/2001)
do
pdftk A=~/tmp.pdf B=$i cat A1-end B1 output ~/tmp1.pdf
mv ~/tmp1.pdf ~/tmp.pdf
done ### This could be condensed into a "one-liner" if desired.
Download database pdf files:
wget -F -np -r -l 2 -nd -nv -nc nH -i a.html
Since the pdf files downloaded are not with .pdf suffix,
have to find the pattern and rename to pdf.
In this case it is with the pattern
"ste=5&docNum=A12345678$"
for i in $(grep 'ste=5&docNum=.[0-9]\{7,\}$' ./files)
do
a=`echo $i | cut -d= -f5`
echo $a
cp $i $a.pdf
done
Sunday, March 7, 2010
Wednesday, March 3, 2010
rescue grub
What to do when you screw up your MBR.
The following are the steps you should follow;
Run rescue CD, in rescue mode:
mkdir /mnt/j
mount /dev/sda3 /mnt/j
mount -t proc none /mnt/j/proc
mount -o bind /dev/ /mnt/j/dev
chroot /mnt/j /bin/bash
In new root:
grub> find /boot/grub/grub.conf
(hd0, 2)
grub> root (hd0,2)
grub> setup (hd0)
grub> quit
sync and reboot
The following are the steps you should follow;
Run rescue CD, in rescue mode:
mkdir /mnt/j
mount /dev/sda3 /mnt/j
mount -t proc none /mnt/j/proc
mount -o bind /dev/ /mnt/j/dev
chroot /mnt/j /bin/bash
In new root:
grub> find /boot/grub/grub.conf
(hd0, 2)
grub> root (hd0,2)
grub> setup (hd0)
grub> quit
sync and reboot
Subscribe to:
Posts (Atom)