Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-09-2016, 07:39 PM
|
#1
|
LQ Newbie
Registered: Nov 2016
Posts: 2
Rep:
|
Having trouble with Linux homework problem
I'm really stuck in this one
I have to Format a file called yourscript, to contain viewable pages, a heading, date, double spaced, and line numbers and send the output to the printer.
|
|
|
11-09-2016, 07:47 PM
|
#2
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
Welcome, BUT others will chastise you for not following 'how to ask questions':
what's your 'guess' on an answer, and more details...
What 'research' have you done? Have you searched for tutorials?
Also, tell us about what Linux you use....
Best wishes tho... A bit more & you'll succeed! hint: what do you think of: man pr
Last edited by Jjanel; 11-09-2016 at 07:52 PM.
|
|
|
11-09-2016, 07:51 PM
|
#3
|
LQ Newbie
Registered: Nov 2016
Posts: 2
Original Poster
Rep:
|
My guess would be using the "pr" command, but I'm not sure how to add the date or line numbers.
What I have so far is: cat -n yourscript | pr -h”Heading” -dD | lp -printername
|
|
|
11-09-2016, 08:06 PM
|
#4
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
GREAT! From reading `man pr`, can you eliminate the `cat...|`, and the 'D'?
Hint: Post 'code' (use LQ Adv. formatting) of what the -n does, from man pr
Extra credit: edit just the title (post#1) to instead say: pr formatting options?
If you don't have a printer, try |more instead of `lp`. Post what you try.
Thanks for 'participating'! p.s. I was editing my #2, while you posted #3
Last edited by Jjanel; 11-09-2016 at 10:46 PM.
|
|
|
11-10-2016, 01:00 AM
|
#5
|
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Arch
Posts: 10,030
|
Jjanel has provided most of the good oil on where to go with this, so I will simply add that if you use [code][/code] tags around your code it is clearer and will stand out to those
trying to assist (this is also why it was suggested to use Adv. formatting )
|
|
|
11-10-2016, 03:21 PM
|
#6
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,664
|
what tools are used in your textbook examples ?
you might want to use those
also what is the input ?
a html page?
a xml file
a CSV file ?
Last edited by John VV; 11-10-2016 at 03:23 PM.
|
|
|
11-11-2016, 04:27 AM
|
#7
|
Member
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
|
Goo-ie 'Forensics' http://pastebin.com/7RhB9V2d Apr 1st, 2015! LINUX EXAM ch4,5,8 ?#35
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 12:35 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|