Hi guys,
I'm trying to create a DataStage job and I'm basing it off an existing similar project.
The 'Input' value of the job is:
Quote:
cd /DATA/CSV_FILES; for i in *.csv ; do if [ -f "$i" ]; then sed "s/^/$i,/" "$i" > temp ; sed 's/.*/&,/' temp >temp2 ; fi ; cat temp2 ; done > output.txt; rm -f temp*
(where "/DATA/CSV_FILES" is where all the files were located)
My understanding is that for each CSV, it added the 'filename' as Column A. And then it joined all the CSV files together and created a single output.txt file.
I've copied everything that this job did - only that my CSVs are slightly different. Unfortunately when I run the job, it does not work and tells me that 'output.txt' is not in the folder. So I'm guessing I need to tweak this UNIX code a bit to suit my needs.
Problem is I don't understand it. Is anyone out there possible to give me some guidance on how to do this? (or better yet, translate it to English please?
)
Kind regards