Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: manit123 on March 23, 2014, 11:45:44 PM

Title: [SOLVED]read command
Post by: manit123 on March 23, 2014, 11:45:44 PM
The linux equivalent for DOS command 'pause' is 'read' .   
I am writing a script which automatically connects a user to specific wireless access point .
For this , I want to tell user 'please turn on wireless switch' , he manually does then presses enter so that script enables wlan0 then connects to WPA-PSK network followed by dhcp ip request.
Where is 'read' command ?
Title: Re: read command
Post by: gerald_clark on March 23, 2014, 11:49:55 PM
It is part of the shell or whatever other scripting language you are using.
Title: Re: read command
Post by: coreplayer2 on March 24, 2014, 12:07:21 AM
If you enter type read at the command line this informs us that read is a shell builtin

Code: [Select]
tc@box:~$ type read
read is a shell builtin


Bash  builtin read http://ss64.com/bash/read.html (http://ss64.com/bash/read.html)

Title: Re: read command
Post by: manit123 on March 24, 2014, 04:57:10 AM
here is my script
Code: [Select]
cp /mnt/sdb1/iwlwifi/*ucode /lib/firmware
cd /mnt/sdb2/tc-wireless_tools
tce-load -i wireless_tools.tcz
cd ../tc-wifi
tce-load -i wpa_supplicant.tcz
read -p 'turn on your wireless switch'
sudo ifconfig wlan0 up
sudo wpa_supplicant -i wlan0 -c /mnt/sdb1/uoxkgopf/wpa_configure.conf &
sudo udhcpc -x hostname manit123  -b -i wlan0 -p /var/run/udhcpc.wlan0.pid