Score:-2

Read -t is not printing the my input after the echo

bq flag
read -t 5 num
echo "$num"

It is not printing num value

Artur Meinild avatar
vn flag
It works for me - which Ubuntu version are you using?
Raffa avatar
jp flag
Do you key-in some input and press Enter within 5 seconds after running `read -t 5 num` or you just wait for it to time-out?
Score:2
sa flag

The correct syntax for read is demonstrated by this example:

$ read num
10 
$ echo "$num"
10
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.