A surfer at a popular Manly beach avoided entering the water minutes before a serious shark attack after being warned of the danger by his mates.