While loop using

for j in `ls -time $1 | awk '{printf("%s %s %s %s %s\n",$4,$7,$8,$10,$11)}')` 

i want to write by using while loop..

how can i do?

While loops are easy once you get used to them. Just remember how in for loops, it's the for variable in $(yadda) with while loops you're using read to set the variable...

ls -time $1 | awk '{printf("%s %s %s %s %s\n",$4,$7,$8,$10,$11)}')|while read VARIABLE;do some_command $VARIABLE;done

Or, example:

(03:08:32\[D@DeCoBox15)
[~]$ cat file
first
second
third
fourth
fith
last

(03:08:36\[D@DeCoBox15)
[~]$ cat file|while read line;do echo "this is the $line line";done
this is the first line
this is the second line
this is the third line
this is the fourth line
this is the fith line
this is the last line

(03:09:00\[D@DeCoBox15)
[~]$

What's even cooler is if everything is evenly spaced, you can easily give each column it's own variable name:

(03:12:55\[D@DeCoBox15)
[~]$ cat file1
first1 first2 first3
second1 second2 second3
third1 third2 third3
fourth1 fourth2 fourth3
fith1 fith2 fith3
last1 last2 last3

(03:13:01\[D@DeCoBox15)
[~]$ cat file1|while read line1 line2 line3;do echo "Im only going to echo the first and third column: $line1 $line3";done
Im only going to echo the first and third column: first1 first3
Im only going to echo the first and third column: second1 second3
Im only going to echo the first and third column: third1 third3
Im only going to echo the first and third column: fourth1 fourth3
Im only going to echo the first and third column: fith1 fith3
Im only going to echo the first and third column: last1 last3

Hell, you can go even further and put everything into arrays...but that should be enough for now.

thank you very much... but have a little problem..

ls -time $1 | awk '{printf("%s %s %s %s %s\n",$4,$7,$8,$10,$11)}'|while read a1 a2 a3 a4 a5;do

user_name=$a1
month=$2
day=$a3
year=$a4
filename=$a5
if [[ $3 = $user_name ]]; then
echo "dosya silme tamamlandi";
/usr/bin/rm -f /bscs/bscsadm/userhome/umit_log/oracle_calisti.txt

fi
    done
fi
exit 0

this is for 'ksh' but i should use 'sh'

how can i convert sh type_?

Ad hoc, I can't spot anything "ksh-specific" in the code you posted - what happens if you just try:

sh script