10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. Can somebody please explain the following lines of KSH code for me? The code checks all sub directories in a specific location which are numbered (E.g. test_01, test_02 ... etc.), then finds the one with highest number and extracts that number from the dir name into the variable num. I'd just... (9 Replies)
Discussion started by: user052009
9 Replies
2. Shell Programming and Scripting
Hi!
I need to translate those line in csh (to initialise variable) into ksh construct.
Any help would be appreciated! I don't know how to replace them :(
Thanks
Hulu
setenv TestHul "$0 $*"
setenv JG `setenvp "JG" "" "$*"`
setenv A_1 `setenvp "A_1" "NA" "$*"`
Please use next time... (2 Replies)
Discussion started by: patator67
2 Replies
3. UNIX for Dummies Questions & Answers
Hi, all of you!!!
I have this code and I won to build-in some more code.
I know this is a lot of code.
if ; then
if ; then
SYSROOT="$1"
S_SCRIPT="cd $1 ; ./etc/rc.sysinit 2>&1 &"
fi
else
... (22 Replies)
Discussion started by: jokerper
22 Replies
4. Shell Programming and Scripting
Hi,
I have a csh:
set NODES = `cat $HOST_FILE`
set NODELIST = $TMPDIR/namd2.nodelist
echo group main >! $NODELIST
foreach node ( $NODES )
echo host $node >> $NODELIST
end
@ NUMPROCS = 2 * $#NODES
I am very frustrated to translate it to bash:
NODES = `cat... (3 Replies)
Discussion started by: rockytodd
3 Replies
5. Shell Programming and Scripting
I have this code using csh and want to convert it to ksh to include this thinking into my ksh scripts. while ( $iarg < $narg )
MATH iarg = $iarg + 1
set arg = $argv
set opt=` echo $arg | awk 'BEGIN { FS="=" } { print $1 }' `
set par=` echo $arg | awk 'BEGIN { FS="=" } {... (2 Replies)
Discussion started by: kristinu
2 Replies
6. Shell Programming and Scripting
Hi there,
in near future I have to change my work surrounding from HP UNIX to Windows Vista (great to get rid of old hardware :), but bad to loose UNIX :( ). As I heavily use KSH scripts to do my job, I was wondering, if there is any HowTo available, supporting me in re-writing the scripts to... (4 Replies)
Discussion started by: Joe-K7
4 Replies
7. Shell Programming and Scripting
Helloo...
I am not much familiar with python..I found this small script in python I even do not have python on my computer...can anyone help me out to convert this into ksh or sh..
PLEASE any help I will appreciate..
here is python code..
#!/usr/bin/env python
import random # Get a... (3 Replies)
Discussion started by: amon
3 Replies
8. UNIX for Dummies Questions & Answers
I created a simple script and attempted to run it. All that the scrip contained was "ls -l".
At first I received the message "ksh: run_dir: not found"
I then tried typing "csh run_dir" This time the script worked.
typing echo $SHELL produced /bin/ksh
I would like to understand why this... (4 Replies)
Discussion started by: SUSANR9999
4 Replies
9. Shell Programming and Scripting
Hey guys,
Hopefully a simple question for you.
In csh I have an alias that looks like:
alias ff 'find . -name \!* -print'
and can therefore perform a search for a file by typing:
ff filename
The same comand does not work in ksh
alias ff="find . -name \!* -print"
I get:
find:... (3 Replies)
Discussion started by: timsk
3 Replies
10. Programming
In one of my programs another process is called using the system command e.g.
lv_error = system("myproc");
where lv_error is declared as an int.
myproc would be returning 0 for success and 1 for failure. e.g.
if (success)
{
return(0);
}else{
return(1);
}
When the return code... (3 Replies)
Discussion started by: mbb
3 Replies