Jump to content
Science Forums

Recommended Posts

Posted

What's your favorite Linux command/program(referring to command-line tools)?

 

here are a few i like :)

grep, fork, sex, emerge ... there's many more, so if you happen to guess one, i'll tell you why, and my use for them :)

Posted

top - I wish that had that on AIX, it's such a pain to figure out the memory/cpu stats for all of my applications, I have to have the admin give me the info as it is now because I don't have access to the AIX tools that do it ;)

Posted

actually this is an excellent one, so dont make the same mistake i did, of bothering to write your own prime factoring algorithm, it may be fast, but its not smart, referring to factor, its great, fast and excellent, whoever thought of putting it in, should told me, cuz i had to actually write not only a an extremely fast solution with bitmaps and a vector, but a recursive one too, so that first one could have ended in like 2 lines of code...

Posted

ok, here's my cool little script for replacing versions of my .jar files in all config files and scripts:

 

#!/bin/sh

SCRIPTS=`find . -name "*.*" -exec grep -l "$1" {} ;`

for file in $SCRIPTS
do
       echo "Editing $file...";
       (cat $file; echo '') | sed 's/'$1'/'$2'/g' > ${file}.tmp;
       sleep 1;
       mv ${file}.tmp $file;
done;

 

oh, and by the way, here's a link to my unix shell scripting tutorial if anyone cares to check it out: http://www.dreamsyssoft.com/unix-shell-scripting/tutorial.php

Posted

thats because one, you dont have dispatch conf installed, two you dont have a distro with a package management system therefore you can't install dispatch-conf as far as i can remember its a portage util...

 

:) pbttt

Posted

nope, I do, because i did not have to write a script and it does loads of stuff then blindfully replace stuff in config files, so pbttt I have a more powerful tool that i didnt have to write, and it is one line per execution, and therefore i win.

Actually have a patch for it that makes dispatch-conf a lot more powerful, friend wrote it, allows you to do real cool stuff...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...