“Goodbye and good luck,” read the text message sent by Houston Rockets point guard Jeremy Lin to teammate Scott Machado.

The text led Machado to think that he had been cut from the Rockets as the 2012-2013 NBA season gets under way today.

Machado, a rookie guard, is now breathing a sigh of relief after learning that Lin sent the text to him by mistake.

The new Rockets point guard meant to send the message to teammate Jeremy Lamb, who was sent to the Oklahoma City Thunder in a trade with Houston.

“I was like, ‘Hey, it’s Scott, it’s not Jeremy,’ ” Machado said he told Lin, according to the Houston Chronicle. “’Did you hear something about me?’ I was all nervous. He was like, “Oh, I apologize, I apologize.’ It all worked out.”

The paper reported Machado, an undrafted free agent rookie out of Iona College, made the Rockets after cutting veteran guard Shaun Livingston.

Machado told the Chronicle that he was unsure whether he would make the team even before Houston traded for Harden.

“I was a little nervous, even before they got traded,” Machado told the paper. “We had four good point guards here and I was the newcomer, the undrafted one. With a whole bunch of people coming in there was nervousness.”

Machado and fellow Rockets guard Toney Douglas will be Lin’s backups.

Lin gained national attention as “Linsanity” swept New York when the point guard was inserted into the Knicks starting lineup last year.

The unheralded point guard out of Harvard, who ironically was waived by the Rockets before the start of last season, led the Knicks to a six-game winning streak in his first six games as a starter.

Lin was a restricted free agent at the end of last season, and Houston offered the point guard a three-year, $25 million contract.

The Knicks declined to match the offer and Lin was headed to the Rockets. New York would have subject to the luxury tax if they matched because Houston’s contract had a poison pill provision that would have seen Lin’s salary skyrocket from over $5 million in the second year to nearly $15 million in the third year.