You're viewing a comment by Peteches and its responses.
You're viewing a comment by Peteches and its responses.
I am being sponsored by Syntress since 2007! They bought me an amazing dedicated server to run catonmat on. If you're looking web services in Chicago area, I highly recommend the Syntress guys!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)


nice work, I Love bash scripting, looking forward to the rest of this series!
For number 4 though you say that the while read line format is the only way to read in a file line by line, however bash 4.x mapfile allows you to read in a file to an indexed array more efficiently, you can then run the for loop over the array. eg
There are also a number of options which allow you to control input
-s count - skip the first count lines
-n count - read in at most count lines
-c quanta - set a quanta for the -C option
-C command - run command every quanta lines passing the index of the array about to be assigned
-0 index - start assigning at array[index] instead of 0
-t - strip trailing newline
-u fd - read from file descriptor fd instead of stdin
excellent alternative to the while read loop in my opinion
Pete
Reply To This Comment