Tuesday, March 08, 2005

Shell Programming

1. http://developers.sun.com/solaris/articles/korn_shell.html

. Precede a script name with dot-slash when executing interactively so UNIX knows that the script is in the current directory.
./capture_vmstat.sh

.Redirect stderr, either to the same destination as stdout or to a unique file.


./capture_vmstat.sh >> ${LOG_FILE} 2>&1

2. Permutations algorithm?
Is it difficult, lets try to work through an example "abc"
abc bac cab
acb bca cba

i) As seen from the pattern the first string is fixed and the last strings keeps on changing.
Thinking of the algorithm ( Natural thought is a recursion, but currently i want
to avoid it and do it by iteration)




No comments: