shane c branch wrote:that was it! thanks.
that crossed my mind as well. i tried it with #!/bin/bash and got the same error.Check that the first line is *exactly* "#!/bin/bash" (or whatever) -- in particular make sure that there isn't a CR at the end of the line. If you do "cat -vet script" (where "script" is the file in question), you should see the first line shown as
i double checked the permissions by doing #chmod u+x scriptname.sh
then tried to run it, but again got the error.
#!/bin/bash$
($ represents end of line) The "#" character is the first one in the file, but I think the error message you've been getting indicates that. If you have
#!/bin/bash^M$
at the beginning of the file then you've managed to get a file with CRLF line terminators -- in this case "dos2unix" is your friend. You should work out how you managed to get a scripit created like this so that you don't do it again :-)
jch
i believe i know the error now. i opened the file in jedit under windows, to check that first line. i forgot to change the buffer option the unix format before saving the file.
it runs succesfully now.
thanks again.
--
regards,
shane
-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list