Thank you Robert:
On Fri, 25 Mar 2005 13:51:40 -0600, Robert Citek
<[EMAIL PROTECTED]> wrote:
> Since xlsfonts outputs one font definition per line, you could also use
> a while loop with a read statement in bash:
>
> $ xlsfonts | head | while read J ; do
> xfd -fn $J
> done
>
> Or use xargs with the "-n 1" option:
>
> $ xlsfonts | head | xargs -n 1 xfd -fn
>
> Or in use awk's implicit while loop:
>
> $ xlsfonts | head | awk '{ system("xfd -fn " $0) } '
>
Great! All of these worked very well.
> If you remove the 'head' portion of the pipeline, you'll get all the
> fonts. If you really want an array, I'd recommend using perl:
>
> $ xlsfonts | head |
> perl -e '@J=(<>) ;
> for ($i=0 ; $i<=$#J ; $i++) {
> system("xfd -fn $J[$i]")
> } ; '
>
> In the above example, @J is the array of the fonts, $i is the
> index/counter, and $J[$i]is the $i-th font in array @J.
I will have to look int the PERL
_______________________________________________
CWE-LUG mailing list
http://www.cwelug.org/
[email protected]
http://lists.firepipe.net/listinfo/cwe-lug