Re: [gedit-list] gedit command line question.



look into the 'pr' text formatting tool (specifically for printing) I
use the following to print all documents(in this case .c source files)
in a directory.

#!/bin/bash
DIR='/home/kevin/docs_to_print'
for i in $(ls $DIR | grep .c);do
        pr -o 3 -w 70 -l 54 $DIR$i | lp -d LaserJet-2200
done


its not a perfect example, but man pr should do the trick ;). This
tool is also part of the gnu core tools, so you should be able to get
it easily for solaris even if its not installed already.

Cheers,
Kevin Kubasik

On 3/27/06, Paolo Borelli <pborelli katamail com> wrote:
> Rich Cooke wrote:
> > We are migrating from Solaris to Linux. We have several perl/Tk
> > applications that use /usr/openwin/bin/mp for printing user text
> > files. All our users like the prints with the file pathnames, page
> > numbers and alike, makes it easier for them to find their prints.
> > We have tried lp with prettyprint option. Not bad but does not seem to
> > support word wrap, and full file pathnames.
> >
> > Tried a man on gedit, there seems to be limited command line inputs.
> > What I would like to do on the command line is sort of:
> >
> > gedit -nowindow -printto printername -file filename
> >
> > This way, from within our perl/Tk application, we can use gedit to print
> > specific files with the wordwrap and page headers without having the GUI
> > popup.
> >
> >
> Hi Rich,
>
>     I am sorry but as you found out by reading the manual gedit doesn't
> support such use case. Maybe it could be added in future versions,
> though I am not really sure it fits in gedit, which after all is
> supposed to be a GUI text editor.
> I am pretty sure that linux offers a large set of command line tools to
> do what you need.
>
> Paolo
>
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list
>


--
Cheers,
Kevin Kubasik
http://blog.kubasik.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]