Same linux command returning different results?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

Same linux command returning different results?

Post by MrBlack »

Hey Community

So I've come across a weird anomaly in Datastage that I can't figure out. I have a directory of symbolic links that point to a mounted drive. I use the Linux FIND command to make a comma delimited list that I can later loop through.

Code: Select all

find *.dbf | tr '\n' ','
I execute this in a sequence command stage. It only finds 7 out of 50 files. I visually checked, ensuring case-sensitivity. I make a copy of the sequence and execute; the copy finds all 50. The Linux command is EXACTLY the same in each sequence but one job returns 7 the other returns 50. Executing the command in a shell window returns all 50. So I'm really scratching my head on this one.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It might be best to also explicitly define the command, i.e. "find /path/to/start/directory -name *.dbf -print".
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check the two commands again, looking for invisible characters such as space or tab.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply