Score:0

bash script not outputting information to a separate file

sy flag

The idea of the script is that it enters the switch, enters the username and password. Enters the show command. And redirects the output of this command to another file. But, perhaps, something is not added in my script, because it simply redirects the show command itself to the file.

(
echo "$Username"
sleep 2
echo "$Pass"
sleep 2
echo "show ..." >> /home/... 
sleep 2
echo "logout"
) | telnet 172.20...
muru avatar
us flag
You should be redirecting the output of `telnet`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.