Rik's Treehouse > Babbling in Binary > Tips 'n' Tricks > Unix |
Problem: I want to run a big batch of jobs sequentially on my Unix machine and I don't want to sit around waiting for each job to finish before I start the next one. How can I automate this procedure?
Solution: Unix was built to handle this kind of problem so it is pretty straight forward (as much as anything is in Unix). Just follow these steps:
nice -19 job1 parameters job2 more parameters & job3 |
Problem: Every time I try to print the postscript file ugh.ps I get the following error message:
lpr: Fatal error - cannot print 'ugh.ps': unprintable file
All my other files print just fine. What's going on here?
Solution: Did you create this file with Microsoft Word? Does it have a long filename? Then this might be the problem: each postcript file has a line near the top which says the title (name) of the file. For some reason, the people at Redmond thought it would be cute for MS-Word to truncate the title if it got too long, so they replace the remainder with an ellipsis (...). The ellipsis is a control character (strange ASCII code) and that's what's causing all the problems. lpr doesn't work if it sees any nonstandard characters in the file. To tell it to ignore this use the -l (literal) command option. Your print command should look something like
lpr -l ugh.ps
Problem: I want to download a bunch of big files to my Unix account but it is too slow! Is there a way to download files without user intervention?
Solution: Yes, here's an example of how I transfer files while offline (only works with ftp):
unix% ftp fileserver.com (connect, give username/password, etc.) ftp> cd the/right/directory ftp> prompt (turn off confirmations) ftp> mget *.zip (use mget to get multiple files) ^Z (hit control-z to pause) unix% bg (resume transfer in the background) unix% logout (walk away)If everything works, the next time you log in you should have all the *.zip files on your system. There's probably a smarter way of doing this but I still haven't got the hang of Unix.
[Rik's Office Hours] [Contact Rik] Last updated: Fri Apr 30 2004, 1:55pm |