WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED]read command  (Read 2132 times)

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
[SOLVED]read command
« 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 ?
« Last Edit: March 24, 2014, 04:57:41 AM by manit123 »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: read command
« Reply #1 on: March 23, 2014, 11:49:55 PM »
It is part of the shell or whatever other scripting language you are using.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: read command
« Reply #2 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

« Last Edit: March 24, 2014, 12:13:38 AM by coreplayer2 »

Offline manit123

  • Sr. Member
  • ****
  • Posts: 315
Re: read command
« Reply #3 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