nullArray Posted January 30, 2009 Share Posted January 30, 2009 I TA a UNIX class for my school and this week I'm grading papers. Our online homework hand-in tool arranges documents like the photo depicts. I'd like a convenient way to print all of these documents..., but they must be printed separately for the the finisher to staple them. Note, documents are .doc, .docx, and .pdf and there are about 150 "student username" folders..., which is about how many documents there are too. First I tried this: ls */*/*.docx > docxs Then using a substitute in vi to replace spaces with backslashes (everyone's filename is different), then to add lpr -printername in front of all the lines. Then I sh'ed that to execute, but it obviously didn't work because lpr won't print any of those files on our UNIX server (duh). It is supposed to print PDFs but we've been having postscript errors lately, according to my boss..., Then I tried: mkdir docs cp */*/*.docs docs My intention was just to FTP into the disk and print the copied files, conveniently in one directory, from my computer instead of the shell..., would have worked...but some students used the exact same file name, ex: "Homework1.pdf" and there were dozens of files that weren't copied. Worse, is that not all of them put their names on their assignments, and "Homework1" doesn't tell me who they are. Any suggestions? Other wise, it looks like I'll be going thru folder by folder printing them one by one.... For the next assignment, we have stricter rules for naming...(username_homework#.pdf), which will allow me to use my second idea without any worry of messing someone up. Thanks. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.