Hi.
I'm working in an IBM mainframe UNIX environment and am running a script as follows:
for i in `find . -name *.xml -type f`
do
test -f $i && iconv -f IBM-932 -t IBM-1047 $i | egrep -l $1 && echo $1" found i
n" $i "searching as ASCII"
done
The idea is to locate all *.xml files beneath where I happen to be in the directory structure, convert then from ASCII to EBCDIC (necessary as egrep works on ebcdic files on the IBM mainframe platform) and then search for a particular string in them. If found then issue a message indicating that the string was found in the ascii file.
When I run it I see output like this:
(JENKINN-TAOS)/software/wasv6Config/W5Q/AsrvW5QE/profiles/default/config >~/nrjscan2 bam146dev
(standard input)
bam146dev found in ./cells/W5QdevUIMX/nodegroups/DefaultNodeGroup/nodegroup.xml searching as ASCII
(standard input)
bam146dev found in ./cells/W5QdevUIMX/nodes/W5QE/serverindex.xml searching as ASCII
(standard input)
bam146dev found in ./cells/W5QdevUIMX/nodes/W5QEDM/serverindex.xml searching as ASCII
(standard input)
bam146dev found in ./cells/W5QdevUIMX/nodes/W5QF/serverindex.xml searching as ASCII
(standard input)
bam146dev found in ./cells/W5QdevUIMX/security.xml searching as ASCII
(standard input)
bam146dev found in ./cells/W5QdevUIMX/virtualhosts.xml searching as ASCII
(JENKINN-TAOS)/software/wasv6Config/W5Q/AsrvW5QE/profiles/default/config >
Does anyone know why I'm getting the (standard input) between each of the lines being echo'd following a successful find ?
Thanks,
Neil.