I need to netcat a U-Boot and perform NAND script and I use below script
spawn netcat -lup 6666expect "Hit any key to stop autoboot" #autoboot counts down from 3 to 0 and somehow one or two send won't stop autobootfor {set count 0} {$count < 30} {incr count} { send "\n\r" after 200 }expect "U-Boot >"send "nand info"
Just need to repeatably send "\n\r" before "U-Boot >" shows up.Is there a better way to do this?