ls -m behaving strangely
Posted: Tue Sep 08, 2009 7:27 pm
Hi all,
I was hoping somebody would have come accross this very strange behaviour of 'ls -m' command executed from the Execute Command stage and is able to help me.
There is a list of files in DEV environment that I want to retrieve that are meant to be delimited by commas and later handled by a loop. The problem arises when the list of files is produced but no commas are included. This proven by the output that can be seen in Director's log of the job. The following loop does what its meant to and processes 1 file only (had the commas been included it would process them all).
Whats strange is that when the actual command 'ls -m' (parameters replaced by values) is copied from director and executed on Unix, the list of files with commas included is the resulting output.
Whats more strange even, is that this exact same job is run on 2 other environments (SIT and UAT on a different unix box to DEV) and it works like a clock.
I know it would be possible to consider some of the other delimiters to solve this small problem, but it is only the DEV box this is not working on and as mentioned before we have it functioning on the subsequent environments. It is just that it is intriguing and I would not mind knowing what could possibly cause this?
Thanks & Regards,
Novak
I was hoping somebody would have come accross this very strange behaviour of 'ls -m' command executed from the Execute Command stage and is able to help me.
There is a list of files in DEV environment that I want to retrieve that are meant to be delimited by commas and later handled by a loop. The problem arises when the list of files is produced but no commas are included. This proven by the output that can be seen in Director's log of the job. The following loop does what its meant to and processes 1 file only (had the commas been included it would process them all).
Whats strange is that when the actual command 'ls -m' (parameters replaced by values) is copied from director and executed on Unix, the list of files with commas included is the resulting output.
Whats more strange even, is that this exact same job is run on 2 other environments (SIT and UAT on a different unix box to DEV) and it works like a clock.
I know it would be possible to consider some of the other delimiters to solve this small problem, but it is only the DEV box this is not working on and as mentioned before we have it functioning on the subsequent environments. It is just that it is intriguing and I would not mind knowing what could possibly cause this?
Thanks & Regards,
Novak