04-14-2010
where is the for loop? can you post the ksh part?
10 More Discussions You Might Find Interesting
1. AIX
I'm using AIX console over putty.
I'm not very happy with default ksh command editing capabilities so I forced insert mode, arrow keys and command history by issuing:
set -o emacs
alias __D=`echo "\002"`
alias __C=`echo "\006"`
in emacs mode history works using ctrl+p, so only thing... (2 Replies)
Discussion started by: vilius
2 Replies
2. UNIX for Dummies Questions & Answers
I have a serious problem and Im sure im just doing something stupid
######Start Load
while
do
/export/home/mldwh/rkem_refresh/int_load/scripts/rkem_refresh.sh
sleep 10
while
do
sleep 5
done
done
######Log and Runstats
sleep... (12 Replies)
Discussion started by: jadionne
12 Replies
3. UNIX for Dummies Questions & Answers
I'm trying to figure out why this if statement won't work:
if || $zipcount != 6 ]]
then
echo ${myline}
echo "ZIPCODE WARNING! ${zipcode} ${zipcount}"
fi
if ]]
then
echo ${myline}
echo "STATE WARNING!... (3 Replies)
Discussion started by: developncode
3 Replies
4. Shell Programming and Scripting
i have a script i which i am using
#!/bin/ksh
todate=$(date +%m%d%y)
dir="$dir/port${todate}"
the above one works in linux ...ut not working in solaries
could some one please help me in that (13 Replies)
Discussion started by: mail2sant
13 Replies
5. Shell Programming and Scripting
I have a script which uses below for loop:
for (( i = 0 ; i <= 5; i++ ))
do
echo "Welcome $i times"
done
But when I run the script, it gives error message:
Syntex Error : Bad for loop variable
Can anyone guide to run it?
Thanks in advance. (10 Replies)
Discussion started by: naw_deepak
10 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to execute a job on the last day of every month, for which i'm using the following code in my Korn shell script :
if ];
then
echo allowed only on last day of month. Today is `date +%d` >t.stm
echo Tomorrow is `date +%d -d tomorrow` >s.stm
exit 0
fi
...
....... (7 Replies)
Discussion started by: devilsadvocate
7 Replies
7. Shell Programming and Scripting
Hi there,
in a script I have
#!/usr/bin/ksh
TEST=hello
export TEST
Problem is, that the variable doesn't get exported. I also tried
typeset -x TEST=hello
When I put the two lines in my .profile, the variable is set fine.
Whats could be the problem here? (4 Replies)
Discussion started by: doc_symbiosis
4 Replies
8. Shell Programming and Scripting
It just does the break...even though the files are not the same...
# Compare extracts
#==========================================
count=0
while (( count < 5 ))
do
(( count+=1 ))
echo "Try $count"
file1=$(ls -l /tmp/psjava.xml|... (5 Replies)
Discussion started by: sigh2010
5 Replies
9. Shell Programming and Scripting
Hey guys,
maybe you can help me.. what am i doing wrong?
Why this doesn`t work in ksh.
while
do
echo "Type y or n"
read decision
if
then
doInstall
fi
done
i also tried this
... (6 Replies)
Discussion started by: xcitan
6 Replies
10. Shell Programming and Scripting
Anyone knows why the following function does not work in ksh (it does in bash)?
var() # Displays var value; case insensitive
{
_var="$1"
if ; then
echo ${!_var}
else
_var=$(echo "$_var" | tr 'a-z' 'A-Z')
echo ${!_var}
fi
unset _var
}$ var home
ksh:... (4 Replies)
Discussion started by: victorbrca
4 Replies