The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 01:10 PM
UNIX Printing MPW UNIX for Advanced & Expert Users 5 05-05-2005 10:36 AM
Printing under UNIX duc UNIX for Dummies Questions & Answers 2 12-28-2004 11:20 AM
SCO Unix 5.0 printing dpadron UNIX for Advanced & Expert Users 2 06-13-2003 04:19 PM
Printing Problems in unix ... ( Bar-cdoe - Ip Printing) QuickSilver UNIX for Advanced & Expert Users 3 06-04-2002 10:48 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-23-2001
pmcg pmcg is offline
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
  #2 (permalink)  
Old 10-23-2001
guest100's Avatar
guest100 guest100 is offline
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 (permalink)  
Old 10-23-2001
pmcg pmcg is offline
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 04:13 PM..
  #4 (permalink)  
Old 10-23-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
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 (permalink)  
Old 10-23-2001
pmcg pmcg is offline
Registered User
  
 

Join Date: Oct 2001
Posts: 7
Thanks alot!

fold -78 filename | lp

works pefectly
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0