Generating printable redirection output with ">"

David dgboles at gmail.com
Sun Apr 25 02:53:01 UTC 2010


On 4/24/2010 10:46 PM, Dick Roark wrote:
> I am trying to generate printable output by using
> 
>      man k lpr > lprman.txt
> 
> This works but the output contains unwanted characters generated by text
> which was "bold" in the original output.  How can I prevent these
> confusing characters from being generated?


Use this script.


---------------------------------------------
#!/bin/bash
## INSTALLATION:
## MAKE A FILE mancon AND PLACE IT IN THE /USR/BIN DIRECTORY, YOU MUST
BE ROOT TO DO THIS ## CHMOD IT TO 700 - * CHOWN TO YOUR USERNAME - *
(chown user:user /usr/bin/mancon) ## TYPE IN mancon AT THE TERMINAL AND
YOU SHOULD SEE "What is the man page?" ## ANY QUESTIONS VISIT
HTTP://CODE-HEADS.COM

echo "CodeHeads Man Page Conversion"
read -p "What is the man page?? " M
if [[ $M == "" ]]
then
echo "Sorry need a MAN page to convert"
else
man $M | col -b > ~/$M.txt
echo; echo "Your file has been saved as $M.txt in your home directory"
fi
---------------------------------------------

Print the result.

-- 


  David

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20100424/8c3a8c58/attachment.bin 


More information about the users mailing list