10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
2. Programming
Hello Team,
I have 2 files.one contains english text and another contains Japanese. so i have to read english text and replace the text with Japanesh text in third file.
Basically, I need a help to write japanese language in text/xml file.I heard wstring does this.Not sure how do i write... (2 Replies)
Discussion started by: SA_Palani
2 Replies
3. Shell Programming and Scripting
Hello, I am new in shell scripting. I need help regarding following.
I have 4 files generated by backups daily. I have stored the names of these 4 files into one file. i.e I have 4 files names as a, b, c & d and these names have been put into one file abcd.txt.
Now I want to cat each file in... (7 Replies)
Discussion started by: Ali Sarwar
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
5. Shell Programming and Scripting
Hi all,
I jut use a loop to read lines from the user and redirect it to a file.
echo "Enter the line"
while read -r LINE
do
echo $LINE >> FILE
if ;then
break
fi
done
input
app... (1 Reply)
Discussion started by: Ananthdoss
1 Replies
6. Shell Programming and Scripting
Hi Experts,
I am tryin to read a file and while doing so i need to skip the lines which start with a hash (#) char.
I thought of using a goto command but a lot of guys on this site say its not the good way to program. Moreover I am using a ksh shell which deos not support goto command.
... (4 Replies)
Discussion started by: bankimmehta
4 Replies
7. Shell Programming and Scripting
hi,
i have 2 files.
file1:
1
2
3
4
5
6
file2:
a
b
c
d
e
f
g
h
i (5 Replies)
Discussion started by: vidyaj
5 Replies
8. UNIX for Dummies Questions & Answers
How can i have a while loop as follows
while read inputline
do
<task>
done < name_list
and also store the values (delimited) on each line to temp variables so as to print them on screen as follows
while read inputline
do
set name | cut -d "," -f1 name_list # #i know this is not... (1 Reply)
Discussion started by: bilal05
1 Replies
9. UNIX for Dummies Questions & Answers
How can I exclude reading lines in a file that contains the following:
filesystem:/home/pach/liv_patches 128005120 88456640 37270758 71% /home/patches
That is, all lines that contain and begins with filesystem: should not be processed/read from a file (5 Replies)
Discussion started by: paulsew
5 Replies
10. UNIX for Advanced & Expert Users
I have a file that has a list of numbers in it. Each line has a different number. I am trying to create some sort of loop within a script that will pick the numbers up on lines 1 and 2 and then put those figures into the script. It then goes through the process then loops back and reads lines 2 and... (5 Replies)
Discussion started by: mariner
5 Replies
pbmtext(1) General Commands Manual pbmtext(1)
NAME
pbmtext - render text into a bitmap
SYNOPSIS
pbmtext [-font fontfile] [-builtin fontname] [-space pixels] [-lspace pixels] [text]
DESCRIPTION
Takes the specified text, either a single line from the command line or multiple lines from standard input, and renders it into a bitmap.
In the bitmap, each line of input is a line of output. Formatting characters such as newline have no effect on the formatting; like any
unprintable character, they turn into spaces.
The bitmap is just wide enough for the longest line of text, plus margins, and just high enough to contain the lines of text, plus margins.
The left and right margins are twice the width of the widest character in the font; the top and bottom margins are the height of the
tallest character in the font. But if the text is only one line, all the margins are half of this.
OPTIONS
-font,-builtin
By default, pbmtext uses a built-in font called bdf (about a 10 point Times-Roman font). You can use a fixed width font by specify-
ing -builtin fixed.
You can also specify your own font with the -font flag. The fontfile is either a BDF file from the X window system or a PBM file.
If the fontfile is a PBM file, it is created in a very specific way. In your window system of choice, display the following text in
the desired (fixed-width) font:
M ",/^_[`jpqy| M
/ !"#$%&'()*+ /
< ,-./01234567 <
> 89:;<=>?@ABC >
@ DEFGHIJKLMNO @
_ PQRSTUVWXYZ[ _
{ ]^_`abcdefg {
} hijklmnopqrs }
~ tuvwxyz{|}~ ~
M ",/^_[`jpqy| M
Do a screen grab or window dump of that text, using for instance xwd, xgrabsc, or screendump. Convert the result into a pbm file.
If necessary, use pnmcut to remove everything except the text. Finally, run it through pnmcrop to make sure the edges are right up
against the text. pbmtext can figure out the sizes and spacings from that.
-space pixels
Add pixels pixels of space between characters. This is in addition to whatever space surrounding characters is built into the font,
which is usually enough to produce a reasonable string of text.
pixels may be negative to crowd text together, but the author has not put much thought or testing into how this works in every pos-
sible case, so it might cause disastrous results.
-B -lspace pixels
Add pixels pixels of space between lines. This is in addition to whatever space above and below characters is built into the font,
which is usually enough to produce a reasonable line spacing.
pixels must be a whole number.
pixels may be negative to crowd lines together, but the author has not put much thought or testing into how this works in every pos-
sible case, so it might cause disastrous results.
USAGE
Often, you want to place text over another image. One way to do this is with ppmlabel. ppmlabel does not give you the font options that
pbmtext does, though.
Another way is to use pbmtext to create an image containing the text, then use pnmcomp to overlay the text image onto your base image. To
make only the text (and not the entire rectangle containing it) cover the base image, you will need to give pnmcomp a mask, via its -alpha
option. You can just use the text image itself as the mask, as long as you also specify the -invert option to pnmcomp.
If you want to overlay colored text instead of black, just use ppmchange to change all black pixels to the color of your choice before
overlaying the text image. But still use the original black and white image for the alpha mask.
If you want the text at an angle, use pnmrotate on the text image (and alpha mask) before overlaying.
SEE ALSO
pnmcut(1), pnmcrop(1), pnmcomp(1), ppmchange(1), pnmrotate(1), pbmtextps(1), ppmlabel(1), pbm(5)
AUTHOR
Copyright (C) 1993 by Jef Poskanzer and George Phillips
28 January 2001 pbmtext(1)