Hi,
I'm trying to read in from an SQL*Loader log file and read the four
numbers provided as summary load counts into a shell script array
using:
grep "^Total logical records" gnis_native.log | sed "s/.*: *//g" | tr
'\n' ' '
Except tr gives me a null output and whilst sed gives me:
xxx
xxx
xxx
Where xxx is a number. Any ideas?
The gnis_native.log is available:
http://examples.oreilly.com/orsqlloader/
See the logs below.
grep "^Total logical records" gnis_native.log
+ grep ^Total logical records gnis_native.log
Total logical records skipped: 0
Total logical records read: 58
Total logical records rejected: 51
Total logical records discarded: 0
grep "^Total logical records" gnis_native.log | sed "s/.*: *//g"
+ sed s/.*: *//g
+ grep Total logical records gnis_native.log
0
58
51
0
grep "^Total logical records" gnis_native.log | sed "s/.*: *//g" | tr
'\n' ' '
+ grep Total logical records gnis_native.log
+ tr \n
+ sed s/.*: *//g