Satan understand in the scripture is in letter only.
When Satan notice that Jesus (Jesus in the role of Son of God) did a fasting. Satan knows that Jesus is literally hunger.
And so he tempted Jesus to make the stones into bread so Jesus can eat.
MATTHEW 4:2-4
2 And when he had fasted forty days and forty nights, he was afterward an hungred.
3 And when the tempter came to him, he said, If thou be the Son of God, command that these stones be made bread.
4 But he answered and said, It is written, Man shall not live by bread alone, but by every word that proceedeth out of the mouth of God.
But Jesus in the role of Son of God did not fasting literal physical but in spiritual.
And he was hunger spirirtually. He must spiritually eat the words of God as Jeremiah did.
JEREMIAH 15:16
16 Thy words were found, and I did eat them; and thy word was unto me the joy and rejoicing of mine heart: for I am called by thy name, O Lord God of hosts.
The law of fasting is being taught by Jesus to Paul and so Paul wrote it.
ROMANS 7:14
14 For we know that the law is spiritual: but I am carnal, sold under sin.
With regards to the knowledge of Satan in the scripture is purely in letter only.
Jesus taught to Paul and Paul wrote it too.
2 CORINTHIANS 3:6
6 Who also hath made us able ministers of the new testament; not of the letter, but of the spirit: for the letter killeth, but the spirit giveth life.
The Spiritual Fasting giveth life.
Only the chosen of God who received the white stone in Revelation 2:17 knows the spiritual fasting.