Hi,
in my db 11.2.0.2 i would create a external table with preprocessor script to show me the list of file in a directory.
Preprocessor banally:
#!/bin/bash
cd /mydir
/bin/ls -l *.txt 2>/dev/null
The problem is that file name that contains whitespace (windows style in a Linux env), for ex:
-rw-r--r-- 1 oracle oinstall 920 Jun 9 17:37 File1.txt
-rw-r--r-- 1 oracle oinstall 72316 Jun 10 10:37 GC File output1.txt
-rw-r--r-- 1 oracle oinstall 72316 Jun 10 10:40 GC File output2.txt
So I cannot use FIELDS DELIMITED BY " ".
FIXED size? No because the filesize change the length of the rows.
I've tried to use awk in my preprocessos script but I've the same problem:
/bin/ls -l *.txt 2>/dev/null |/bin/awk '{printf "%s %.2d %s %s\n", $6,$7,$8,$9}'
Any ideas?