View Single Post
Old 08-24-2015, 03:28 PM   #271
Difflugia
Testate Amoeba
Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.Difflugia ought to be getting tired of karma fortunes by now.
 
Difflugia's Avatar
 
Posts: 3,049
Karma: 27300000
Join Date: Sep 2012
Device: Many Android devices, Kindle 2, Toshiba e755 PocketPC
Quote:
Originally Posted by badgoodDeb View Post
I'm attempting to convert your commands to UNIX and Mac (which is unix at heart). "dd" is built in to a mac, in a terminal window. File b.txt can be created either in a text editor, or via
cat >b.txt
[ 0 0 0 0 0 0 0 0 ]^d^d

and ls -a b.txt shows that it has 19 bytes in size.

Copy is cp.

But what does your /b flag do? I'm trying to translate that.

Deb

PS since I'm working with a COPY of the Nelson*Maps*.pdf file, I renamed it Maps.pdf, so that the dd command lines weren't so long! Though of course a <tab> command will autocomplete the filename anyway.
Actually, I figured it out on a Linux system myself and converted things to Windows.
The "/B" on the copy command is telling it that it's binary file, which isn't necessary on UNIX. In Windows, the copy command also includes file concatenation using the "+" in between the files. The command that you want on UNIX is:
Code:
cat a b.txt c > fixed.pdf
If for some reason that doesn't work for you, this should:
Code:
sed "s/\[ 1 0 1 0 1 0 1 0 \]/\[ 0 0 0 0 0 0 0 0 \]/" Maps.pdf > fixed.pdf
Difflugia is offline