Tag Info

Hot answers tagged

8

As mentioned in a comment and without seeing any of your code or other information (which would not be on-topic here anyway) all I can say is your program appears to be IO bound. The means while your calculations could use more of your CPU, they are having to wait on data and spending many cycles waiting rather than calculating. This can be due to the way ...


5

grep -e foo -e bar -e baz files or: grep 'foo bar baz' files If those foo, bar, baz are meant to be strings as opposed to basic regular expressions, add the -F option to those 2 grep commands above. For extended regular expressions: grep -E 'foo|bar|baz' files If the list of strings is in the positional parameters ($1, $2...): NL=' ' IFS=$NL # or ...


3

You are asking the wrong question, or asking the question wrongly and in the wrong stack, this is a better question to ask in the programming/stack-overflow for people to give you answers based on the algorithms used inside awk and sort. PS: also do the needed with nawk, mawk and gawk to give us some more details to "zone into" ;) and do the runs like a 100 ...


3

You can use lightweight distributions that require less ram. Linux doesn't need 512MB. SWAP is kind of temporary substitution for RAM. You could use it, but it's much slower than RAM, and could make your experience unpleasant. Still, you can check out Puppy Linux requirements. It's known for being lightweight. Also, here you can see list of distributions ...


3

egrep (or grep -E) can do OR: egrep "string|string|string" <file>


3

Here's a summary of some of the drawbacks of: cat $file | cmd over < $file cmd First, a note: there are (intentionally for the purpose of the discussion) missing double quotes around $file above. In the case of cat, that's always a problem except for zsh; in the case of the redirection, that's only a problem for bash or for some other shells only ...


2

That pretty much means your apps are IO bound--your hardrive/network, etc. can't keep up with your processor and consequently, the processor spends a lot of time waiting on IO data, not using its full potential. If the IO your apps depend on is the network and you aren't downloading at your full bandwith, you might get an efficiency increase by adding more ...



Only top voted, non community-wiki answers of a minimum length are eligible