Hi,
Thnks for the reply.
I have used the following command as you told...
grblib VerCsm.cpp | od -c
the output is
0000000 s t r i n g . h \n M i s c . h \n
0000020 D r i P r m . h \n D r i D e f .
0000040 h \n G b l D e f . h \n E r r M s
0000060 g . h 033 [ 0 m \n C h i p I m g .
0000100 h \n M t q H d r . h \n M t q C s
0000120 m . h 033 [ 0 m \n V e r D e f . h
0000140 \n
0000141
-------------------------------------------------------------------------
Then i have added some sed and tr command to filter the junk out
grblib VerCsm.cpp | od -c |sed 's/033//g;s/\[//g;s/m//g;s/0//g' | tr -d "123456"
s t r i n g . h \n M i s c . h \n
D r i P r . h \n D r i D e f .
h \n G b l D e f . h \n E r r M s
g . h \n C h i p I g .
h \n M t q H d r . h \n M t q C s
. h \n V e r D e f . h
\n
-------------------------------------------------------------------------
Which is (without od)
grblib VerCsm.cpp | sed 's/033//g;s/\[//g;s/m//g;s/0//g' | tr -d "123456"
string.h
Misc.h
DriPr.h
DriDef.h
GblDef.h
ErrMsg.h
ChipIg.h
MtqHdr.h
MtqCs.h
-------------------------------------------------------------------------
when redirected to a file say tmp i saw...
string.h
Misc.h
DriPr.h
DriDef.h
GblDef.h
ErrMsg.h^[
ChipIg.h
MtqHdr.h
MtqCs.h^[
VerDef.h
-------------------------------------------------------------------------
Due to sed the 'm's are gone from ChipImg.h.etc..which was unexpected...and the redirected output tmp still showed "^[" character, which is not displayed in od output.
My terminal prompt value PS1 is
export PS1="\[\e[1;31m\][\[\e[36;1m\]\u\[\e[31;1m\]@\[\e[32;1m\]\H\[\e[1;36m\]{tty:\l}\[\e[31;1m\]]\[\e[1;37m\]\W\[\e[1;31m\]$ \[\e[1;37m\]"
which will display like this
[bas@casinox{tty:18}]bin$
-------------------------------------------------------------------------
The actual culprit was strMatch script which was displaying the output in yellow color...the script works fine when the color is removed....i use the following script to add color while echoing
#scriptfile cecho
open_escape="^[[0m"
close_escape="^[[0m"
case $1 in
red) open_escape="^[[1;31m"
shift ;;
green) open_escape="^[[1;32m"
shift ;;
blue) open_escape="^[[0;34m"
shift ;;
purple) open_escape="^[[1;35m"
shift ;;
cyan) open_escape="^[[0:36m"
shift ;;
grey) open_escape="^[[0;37m"
shift ;;
white) open_escape="^[[1;37m"
shift ;;
yellow) open_escape="^[[1;33m"
shift ;;
bold) open_escape="^[[1m"
shift ;;
*) shift ;;
esac
echo "${open_escape}$*${close_escape}"
exit 0
-------------------------------------------------------------------------
Eventhough the issue was solved by removing the color......i would like to know how to remove those junk characters..........since the solution was just an escape method but not an actual dealing with the situation.....
.