susie
10-22-2001, 11:28 PM
I dont know all the commands for writing programs. I am mainly curious about printing (not to be confused with printf()!) how do I print my programs and their output??
|
Click to See Complete Forum and Search --> : vi in the terminal susie 10-22-2001, 11:28 PM I dont know all the commands for writing programs. I am mainly curious about printing (not to be confused with printf()!) how do I print my programs and their output?? tnordloh 10-23-2001, 02:12 AM If your printer is set up ( I'm assuming you're using Linux ) then from the command line you type lp foo.c. I personally use the 'script' command to print program output. You type 'script foo' and run the program. When it's done, you hit ctrl+d, and your program output is now in a file named foo. Then you can use that lp command again to print it out. susie 10-23-2001, 10:06 PM okay maybe I am just dumb but I cant figure it out! can somone please explain to me in kindergarten language with examples? I wrote a program called as2q6.c and all I want to do is print my program! This lpr ands lp stuff is way too complex. I am totally frustrated. AdaHacker 10-23-2001, 10:32 PM It's not really that complex, just a different way of doing things. To print out a file - any file - just type: lpr filename from the command line. That'll send your file to the printer, and then (provided everything's configured correctly) your paper copy will come right out. If you're not comfortable using the command line or vi, you could always switch to a GUI text editor, like gedit or kedit, that has menus and buttons for all that sort of stuff. The stuff about the script command is for printing all your program's output. What script does is make a record of, basically, everything that pops up on the screen. When you start it, it will sit in the background and capture every ketstroke you enter as well as all the ouput from every command you run until you tell it to stop (by pressing ctrl-d or typing exit). When you exit, it will write all that information to a text file, which you can print like anything else. susie 10-23-2001, 11:29 PM OK, so I figured out that everything that I send to print in Linux gets sent but does not register in my print queue or come out of the printer. When I got Linux installed, we did a test print and it worked just fine, but now at home it is not registering. Any suggestions?? AdaHacker 10-24-2001, 02:39 PM Originally posted by susie: <STRONG> When I got Linux installed, we did a test print and it worked just fine, but now at home it is not registering.</STRONG> Wait a minute. Is this two separate systems you're talking about, e.g. one at work and one at home? Or is it a laptop you're talking about? What do you mean by "now at home?" I'm assuming you didn't change any of the printer configuration stuff. If you're using the same printer on the same system, if it worked before then it should work now. Myabe it's a hardware problem. You might want to try another printer or your printer on another system just to test it. Of course I could be completely wrong. I'm really just guessing at this point. kmj 10-24-2001, 03:47 PM erp; this should be moved to the General Questions or Tech support. The subject line is such a tease. If you want help with vi you can ask here, but q's aboot printing don't belong. Every time I see the subject, I shout "Oh, a vi question!"... my coworkers are getting annoyed. Strike 10-24-2001, 06:53 PM Originally posted by kmj: <STRONG>erp; this should be moved to the General Questions or Tech support. The subject line is such a tease. If you want help with vi you can ask here, but q's aboot printing don't belong. Every time I see the subject, I shout "Oh, a vi question!"... my coworkers are getting annoyed.</STRONG> Agreed, moving to Tech Support. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |