Hi all ,
I have a simple script to get the file name and creation date
#! /bin/ksh
for ifile in `ls -ltr | awk -F " " '{print $6 , "#" , $7 , "#" , $8 , "#" , $NF}'`
do
echo ${ifile}
done
expected output
Sep # 10 # 00:00 # file_1
but it is coming as
#
Sep
#
10
#
00:00
#
file_1
Instead of printing row by row it print seprated by spaces :wall:
TIA
Found the solution
---------- Post updated at 12:58 AM ---------- Previous update was at 12:39 AM ----------
Find the solution 
#! /bin/ksh
ls -ltr | awk -F " " '{print $6 , "#" , $7 , "#" , $8 , "#" , $NF}' | while read LINE
do
echo "${LINE}"
done