[OpenIndiana-discuss] timeout display for input prompt

Thebest videos sri.chityala504 at gmail.com
Mon Mar 8 09:38:26 UTC 2021


hi Team,

Im trying create a csh script.
requirement:
when i script runs it asks for user input. prompt should wait for 10secs.
if not then exit the script.
i have solution for bash script where i can use read -t 10 username. but i
want same in csh
```
#!/bin/csh
echo -n "username:"
set req = $<
echo "username is $req"
sed -i.bak "/rootpw/s/edjos/$req/" /boot/loader.conf
```
and for advance level, the message should look like "prompts end in 10(this
number should decrease and lively should visible the timeout secs)"


More information about the openindiana-discuss mailing list