View Single Post
  #3   (View Single Post)  
Old 16th June 2008
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Default

Hello,

Quote:
Originally Posted by J65nko View Post
You don't define the variable ${firstchars}.
Code:
read firstline
firstline=`expr "$firstline" : '\(..\)'`

if [ "$firstchars" = "%!" ]
IMHO that should be
Code:
read firstline
firstchars=`expr "$firstline" : '\(..\)'`

if [ "$firstchars" = "%!" ]
Ooops. I mistyped - it is
Code:
firstchars=`expr "$firstline" : '\(..\)'`
in the actual file.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14)
Reply With Quote