In Unix shells, this is accomplished with a pipe, "|". Oh, a crusty old mainframer might hit you with a slide rule if you say this out loud, but think about it: all you need is a mechanism that will take the output from command1 and make it the standard input for command2, and so on. If you think about it, you really don't need those tempfiles. Not only do you have to spend a lot of time typing and waiting, but constant I/O to a drive is generally the worst drag on speed. Worse, you might erase the wrong file along the way. That is a lot of typing it discourages laziness and impatience. dr_unix% command1 sourcefile > tempfile1 However, what if you want to run several commands on your data? Well, you could do something like this: In the last column, we looked at how input and output can be redirected to and from files. If you have any questions about what you read here, check out the earlier columns, write back in the comments below, or join us in the Hardcore X! forum. ![]() ![]() ![]() This series is designed to help you learn more about the Mac OS X command line. "Tiny differences in input could quickly become overwhelming differences in output." The Mac Observer Express Daily Newsletter
0 Comments
Leave a Reply. |