The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-15-2008
rahulkhn rahulkhn is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 1
hcitool scan via shell script

Hello,

Im new to shell scripting , and i have the following question .

The hcitool scan command returns the bluetooth address of the phone . When it is run the output is something like


Code:
Scanning....
             00:A1:5D:AB:B2:E9  Nokia 6600

Can i get the output in a varaiable in a shell script ?

I tried redirecting the output to a file, as follows


Code:
hcitool scan > addr

But the file only recorded "Scanning....". The remaining part was not saved.

Please help.

Thanks.

Last edited by rahulkhn; 07-15-2008 at 09:02 PM..