in my linux machine red-hat 5.1 - in ppp file - I have only the signature.pl string !!!
- remark - third application write the signature.pl string in to ppp file
I set ppp file in $a param And compare $a with signature.pl
But as all see here this not equal - why ? or if I have empty space? How to solve this?
# more /var/tmp/ppp
signature.pl
# a=`cat /var/tmp/ppp`
# echo $a
signature.pl
# [[ $a = signature.pl ]] && echo equal
or
# [[ $a == signature.pl ]] && echo equal
diff example that works ! - from ksh shell (LINUX RED-HAT 5.1)
[u@h w]# echo signature.sh > file
[u@h w]# cat file
signature.sh
[u@h w]# a=`cat file`
[u@h w]# echo $a
signature.sh
[u@h w]# [[ $a = signature.sh ]] && echo eq
its print "eq"
signature.sh
andsignature.pl
...they aren't the same.echo "${.sh.version}"
What happens if you do:[[ $a = $a ]] && echo eq
/var/tmp/ppp
throughod -c
- it might contain some unprintables.