Im trying to execute the below command on our server to list files and replace the newline in the file list with spaces, but the character 'n' is getting replaced with a space, is there any environment variable that needs to be set in UNIX?
sh -c 'ls -trx /data/inbound/drm/DRM_PRCC_Category_Flat*.txt /data/inbound/drm/DRM_PRCG_Group_Flat*.txt | tr "\n" " " '
gives the output
Output from command ====>
/data/i bou d/drm/DRM_PRCC_Category_Flat_20090617_113245.txt
/data/i bou d/drm/DRM_PRCG_Group_Flat_20090617_113319.txt
I expect the output to be
/data/inbound/drm/DRM_PRCC_Category_Flat_20090617_113245.txt /data/inbound/drm/DRM_PRCG_Group_Flat_20090617_113319.txt
Funnily the same command is working fine on 3 other servers.
Is there any environment variable that needs to be set or any of the LC_ env variables that hav eto be changed?
Regards
Ramesh