Sponsored Content
Full Discussion: Printing from unix with lp
Top Forums UNIX for Dummies Questions & Answers Printing from unix with lp Post 9125 by pmcg on Tuesday 23rd of October 2001 06:08:00 AM
Old 10-23-2001
Sorry, I'll try to explain more.

If you have a file like this
Code:
    if ($current_state eq "new_file")
      {
        @array=split(/ /,$line);
        $filename=@array[2];
        $filename=substr($filename,5,length($filename));
      }

but the width of your pare is like this

<-------------------------------------->

the output wil be..
Code:
    if ($current_state eq "new_fi
      {
        @array=split(/ /,$line);
        $filename=@array[2];
        $filename=substr($filenam
      }

How do you get an output like...
Code:
    if ($current_state eq "new_fi
le")
      {
        @array=split(/ /,$line);
        $filename=@array[2];
        $filename=substr($filenam
e,5,length($filename));
      }

Also, I did have a look at the man pages and found nothing about this.

Hope this is clear now.

added code tags for readability --oombera

Last edited by oombera; 02-18-2004 at 04:13 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies

2. UNIX for Advanced & Expert Users

SCO Unix 5.0 printing

Iv'e been having a problem with printing that driving me CRAZY! I am trying to print a large file about 200-300 pgs, but the print job reaches a certain point then stops, the job does'nt finish. Anyone have any suggestions? (2 Replies)
Discussion started by: dpadron
2 Replies

3. UNIX for Dummies Questions & Answers

Printing under UNIX

Hi All As UNIX newbie, (I know Open VMS very well) I have the following question: If I use the lpr command for printing, I normally specify the printer name an the file I want to print. So far so good. Once this is done I can than check with the lpstat command the status of my printjob, but... (2 Replies)
Discussion started by: duc
2 Replies

4. UNIX for Advanced & Expert Users

UNIX Printing

Greetings. Got a problem I'm working on, not that familiar with UNIX to be honest. We're having some issues printing from a UNIX Server, hoping someone can help. Here's the situation: We have remote offices that use Microsoft Windows Remote Desktop Client to connect to a Windows 2003 Terminal... (5 Replies)
Discussion started by: MPW
5 Replies

5. HP-UX

Printing from unix to windows.

Hi, This issue is killing me. I'm looking to get advise on setting up a remote printer in unix "HP-UX" which will print to a printer which sits remotely connected to a windows 2000 server. I guess I'm looking for an idiots guide - any assistance you may offer will be gratefully received. ... (2 Replies)
Discussion started by: pmaths
2 Replies

6. UNIX for Advanced & Expert Users

Unix Printing

Hi, I need to print PDF from Unix command line on couple of printers like Lexmark T644PS, HP LJ4100DTN connected to Windows Print Server. I need options of mentioning the printer name and choosing tray number for printing. I was successfull in FTPing PDF files to printer but i could not find... (2 Replies)
Discussion started by: snvijaysankar
2 Replies

7. SCO

Unix Printing

Hi, The code is generating a file of 180 lines, I can check that with vi, but when I am executing the following command for duplex printing , it is printing 4 pages which include 2 blank pages 2 & 4 (page no). $ lp -d printer -0 'land,double,lpi=8,length=90' filename It is expected to print... (1 Reply)
Discussion started by: dsd
1 Replies

8. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

9. Shell Programming and Scripting

Need help with printing in UNIX

I have a file that looks like below: a:b:c d e f g h u:f:j e:k:c0 d9 e1 x55 h789 p:d:hh dtyu gasd lrtyu oqa Is there a way to print is as given below: a:b:c d e f g h u:f:j e:k:c0 d9 e1 x55 (5 Replies)
Discussion started by: sags007_99
5 Replies

10. UNIX for Advanced & Expert Users

Printing a document in UNIX

Hi, I would like to know the command to print a document with portait option. Note : I used the below command, however I am not getting any output and it is blocking the printer queue. lp -d Dubprint -o portrait Adhoc_stmt Also, how can I see the default printer settings and how to... (1 Reply)
Discussion started by: mr_manii
1 Replies
pcfof(8)						      System Manager's Manual							  pcfof(8)

NAME
pcfof - Generic print filter for ANSI, PCL, and multi-language PostScript printers SYNOPSIS
/usr/lbin/pcfof +Bbanner-tray +Cfilename.pcf [-n login] [-h host] [...] [accounting-file] OPTIONS
Use of the print options is dependent on the features available on the print device, and on the current status of those features. For example, selection of a particular paper size and orientation requires that appropriate paper is correctly loaded in the paper trays avail- able on the print device. Options in /etc/printcap Specifies the default tray name to select for printing the banner page. For example: :of=/usr/lbin/pcfof +Bupper +Cln17.pcf: In this example, the banner page will be printed on whatever paper is currently loaded into the upper tray on the selected print device. Specifies the name of the printer configuration file to use for this print job. Specifies the default tray name to select for printing the file. For example: :if=/usr/lbin/pcfof +Iupper +Cln17.pcf: Specifies the default tray name to select for printing the trailer page. For example: :of=/usr/lbin/pcfof +Tlower +Cln17.pcf: This command is useful of you want to use colored paper as a divider between print jobs. Specifies the default tray name to select to place the printed pages. For example: :if=/usr/lbin/pcfof +olower +Cln17.pcf: Print Filter Options Specifies the host name of the job owner. Specifies the amount of indentation. This value controls how far the print image appears from the edge of the page. Specifies the login name of the job owner. Specifies the tray where the printed pages are placed. See the -I option for information on printer configuration files. Specifies the page width in columns. Selects printer features but does not perform any file processing. Specifies the tray name from which print paper is selected. To find the available options, view the printer configura- tion file (.pcf file) specified in the /etc/printcap file by the if entry. For example: :if=/usr/lbin/pcfof +Cln17.pcf: The ln17.pcf pcf file is located in /usr/lbin/pcf/ln17.pcf. The pcf file header provides additional information on available tray options. Specifies the number of sides to print on each sheet. You can specify sides as follows: Print on one side of the sheet. Print on both sides of the sheet. Specifies options related to page orientation and printing of text files. The option-list argu- ment can include one option or multiple options that are separated by commas (no embedded spaces). The following settings for page orientation are valid for both PostScript or text files: The printed output is parallel to the short side of the page. The printed output is parallel to the long side of the page. The following options are available for printing text (not PostScript) files: Print even numbered pages. Reduce the number of lines on a page to n lines. Print odd numbered pages. Perform codeset conversion if codeset-name is different from the codeset component of the current locale and if the appropriate codeset converter is installed on the system. See iconv_intro(5) for information about codeset conversion. Print the pages of a file within the start and end parameters. When start is not specified, printing starts at page 0. When end is not specified, printing continues to the end of the file. The file header may specify additional printer-specific options. (See the description of the -I option for the location of files.) OPERANDS
Specifies the file in which accounting information will be recorded. DESCRIPTION
The pcfof filter is a generic print filter that can be used with text and PostScript files and handle printer device dependencies. The type of printer that the filter is supporting is determined by the printer configuration file (.pcf file) that is specified by the +C option. The Tru64 UNIX product includes files for a variety of printers. In addition, a template file (/usr/lbin/pcf/template.pcf) is available for the system administrator to customize for use with additional printers. The pcfof filter should be specified for both the of and the if entries in the /etc/printcap file. Use the wwpsof filter when you want to print files in languages for which printer-resident fonts are not available. See the wwpsof(8) ref- erence page for more information. EXIT STATUS
An error has occurred. ERRORS
The /etc/printcap error log field, lf, is used to specify the name of the error log file. SEE ALSO
Commands: cancel(1), lpr(1), pr(1), printer(1), pac(8), thailpof(8), wwpsof(8) Files: printcap(4) Others: i18n_printing(5) System Administration pcfof(8)
All times are GMT -4. The time now is 11:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy