Iwan Tamimi
asked on
ls running on job scheduler gives a strange character
I have a script on RedHat 6.2 Enterprise Linux contains a simple command as "ls -la > output.txt" if I run the script direct from the terminal the result was OK (the script is a ksh script). The problem if I run from the job scheduler (I am using Hitachi JP/1), the output file contained strange character. I am thinking it is because of the color code, but I tried everything with the same result.
I tried the following commands on the script:
unalias ls
ls -la /tmp/ > /tmp/test_ls_la.txt
/bin/ls -la /tmp > /tmp/test_bin_ls.txt
\ls -la /tmp > /tmp/test_bs.txt
/bin/ls -la --color=none /tmp > /tmp/test_ls_nocolor.txt
all the command above give me the same result:
-rw-r--r-- 1 dmoopr produsers 601071 4æ 18 15:05 2012 /dmo03/dmotmp/prod/tmp/M1d mo/L_HWIMS 1_20120418 1410_2571
-rw-r--r-- 1 dmoopr produsers 255743 4æ 18 15:05 2012 /dmo03/dmotmp/prod/tmp/M1d mo/L_HWIMS 1_20120418 1410_2572
As you can see there is 4æ character.
Anyone knows how to solve it?
Thank you,
Iwan Tamimi
I tried the following commands on the script:
unalias ls
ls -la /tmp/ > /tmp/test_ls_la.txt
/bin/ls -la /tmp > /tmp/test_bin_ls.txt
\ls -la /tmp > /tmp/test_bs.txt
/bin/ls -la --color=none /tmp > /tmp/test_ls_nocolor.txt
all the command above give me the same result:
-rw-r--r-- 1 dmoopr produsers 601071 4æ 18 15:05 2012 /dmo03/dmotmp/prod/tmp/M1d
-rw-r--r-- 1 dmoopr produsers 255743 4æ 18 15:05 2012 /dmo03/dmotmp/prod/tmp/M1d
As you can see there is 4æ character.
Anyone knows how to solve it?
Thank you,
Iwan Tamimi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Iwan