The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix Printing snvijaysankar UNIX for Advanced & Expert Users 2 06-16-2007 10:10 AM
UNIX Printing MPW UNIX for Advanced & Expert Users 5 05-05-2005 07:36 AM
Printing under UNIX duc UNIX for Dummies Questions & Answers 2 12-28-2004 08:20 AM
SCO Unix 5.0 printing dpadron UNIX for Advanced & Expert Users 2 06-13-2003 01:19 PM
Printing Problems in unix ... ( Bar-cdoe - Ip Printing) QuickSilver UNIX for Advanced & Expert Users 3 06-04-2002 07:48 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-23-2001
Registered User
 

Join Date: Oct 2001
Posts: 7
Printing from unix with lp

Hey,

When printing from UNIX all the dataafter the end of the page is not printed!!

How can I use lp so that instead of just printing to the end of the page, it stops at the end of the page and then prints on the next line???

Thanx
Forum Sponsor
  #2  
Old 10-23-2001
guest100's Avatar
Banned
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
Have a look at the manul pages.It might help.

<pre>
man lp
</pre>

You don't relly make clear what your exact problem is, maybe you need to set your printer up.???
  #3  
Old 10-23-2001
Registered User
 

Join Date: Oct 2001
Posts: 7
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 01:13 PM.
  #4  
Old 10-23-2001
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
try man fold

If that utility is installed on your system, I think it'll be exactly what you want. You can cat the file out, pipe it throught fold (I think the syntax woiuld be like fold -80, for 80 lines. The man page is more accurate than I am, though), then send it to lp.
  #5  
Old 10-23-2001
Registered User
 

Join Date: Oct 2001
Posts: 7
Thanks alot!

fold -78 filename | lp

works pefectly
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0