Quantcast
Channel: Active questions tagged expect - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 158

expect - repeatably send "\n\r" before a match expect

$
0
0

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?


Viewing all articles
Browse latest Browse all 158

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>