Izaya 19 Posted May 19, 2014 Share Posted May 19, 2014 So I wrote a simple program to print files. It supports lines longer than 30 chars and multiple pages. Get it here: http://pastebin.com/PX0D137U Usage: print [-g] <file> -g is used for specifying local instead of global paths. Quote Link to post Share on other sites
Wobbo 8 Posted May 19, 2014 Share Posted May 19, 2014 So this is kinda like cat, but for printers? Neat! Quote Link to post Share on other sites
Techokami 2 Posted May 21, 2014 Share Posted May 21, 2014 Oh boy, I needed this. Let's see how it- ...oh. Quote Link to post Share on other sites
Izaya 19 Posted May 21, 2014 Author Share Posted May 21, 2014 Did you use the full path? It needs the full path, it doesn't use the shell's current path. It'd be easy to do though... Quote Link to post Share on other sites
Izaya 19 Posted May 21, 2014 Author Share Posted May 21, 2014 Oh boy, I needed this. Let's see how it- ...oh. Okay, that should work with local paths. Enjoy Sorrry about that, I usually operate from / so I didn't noticed. I also introduced a new -g option, for specifying global paths instead of local paths. Quote Link to post Share on other sites
Techokami 2 Posted May 22, 2014 Share Posted May 22, 2014 Yeah, I try to keep things somewhat more POSIX-ish by doing things in the /home directory. Throwing everything into the root feels extremely sloppy imho! Also, I made some small improvements to your program. Gave it a usage thing if you don't provide any input files, added a check for a printer, and made things a little more spaced out. Grab here: http://pastebin.com/PiDZa9ru However... Quote Link to post Share on other sites
Izaya 19 Posted May 25, 2014 Author Share Posted May 25, 2014 Okay, after 2 days of on-and-off testing, it seems to at the very least run. Enjoy Quote Link to post Share on other sites