Click here to Skip to main content
14,241,538 members

Linux Programming

 
GeneralRe: Opening JavaFX jar on Ubuntu Pin
Valentinor9-Jun-19 7:27
memberValentinor9-Jun-19 7:27 
GeneralRe: Opening JavaFX jar on Ubuntu Pin
Richard MacCutchan9-Jun-19 21:41
protectorRichard MacCutchan9-Jun-19 21:41 
GeneralRe: Opening JavaFX jar on Ubuntu Pin
Valentinor10-Jun-19 5:08
memberValentinor10-Jun-19 5:08 
GeneralRe: Opening JavaFX jar on Ubuntu Pin
Richard MacCutchan10-Jun-19 5:16
protectorRichard MacCutchan10-Jun-19 5:16 
GeneralRe: Opening JavaFX jar on Ubuntu Pin
Valentinor10-Jun-19 5:22
memberValentinor10-Jun-19 5:22 
QuestionEDITED Where and how to change DBus security access to "name "? ( Added Link at the front of the original post.) Pin
Vaclav_2-Jun-19 5:19
memberVaclav_2-Jun-19 5:19 
QuestionPost deleted by author Pin
Vaclav_24-May-19 4:54
memberVaclav_24-May-19 4:54 
AnswerRe: Help with analyzing bluetooth "hci_inquiry" function Pin
Richard MacCutchan24-May-19 5:01
protectorRichard MacCutchan24-May-19 5:01 
AnswerRe: Post deleted by author Pin
Richard MacCutchan27-May-19 5:28
protectorRichard MacCutchan27-May-19 5:28 
QuestionLooking to figure out how to design a desktop and theme for an operating system based off of Linux. Can anyone point me in the right direction on how to do this? Anyone know of any books? Any tips? Any pointers? Any Forums? etc. The other parts are a Pin
justinsloan3217-May-19 22:18
memberjustinsloan3217-May-19 22:18 
AnswerRe: Looking to figure out how to design a desktop and theme for an operating system based off of Linux. Can anyone point me in the right direction on how to do this? Anyone know of any books? Any tips? Any pointers? Any Forums? etc. The other parts a Pin
Richard MacCutchan17-May-19 22:21
protectorRichard MacCutchan17-May-19 22:21 
QuestionPARTIALLY SOLVED hcitool scan with grep pipe Pin
Vaclav_17-May-19 14:14
memberVaclav_17-May-19 14:14 
could somebody assist me with resolving the following issues?

I am trying to extract BD (bluetooth device) address form "hcitool scan" command.
I am having two issues.

1. When I use the attached code in terminal it returns expected BD addresses, The requested output is "color coded" so I have highlighted the actual output.
It is working exactly what the grep options are specified.

I am stomped as far as how to option grep to retrieve the LAST part of the address.
I did try to option for SPECIFICALLY retrieve only five of the hex with colon (Smile | :) combinations , for testing purposes , but it didn't work.

I am assuming that would be one way to get the whole address -retrieve five combinations of hex / colon and then retrieve the last two hex digits.

Here is my attempt do retrieve the five hex / colon combinations

hcitool scan | grep '[[:xdigit:]]\{2\}:]\{5\}'


I do not need references to man, I am asking for code help.


This following code partially works retrieving five hex / colon combinations


pi@pi:~ $ hcitool scan | grep '[[:xdigit:]]\{2\}:'
	00:50:B6:80:4D:5D	jim-desktop




Addendum
SOLVED
Retrieved full address by "reversing" the grep - processing FIRST hex number then processing colon /hex combination five times.

pi@pi:~ $ hcitool scan | grep -i '[[:xdigit:]]\{2\}\(:[[:xdigit:]]\{2\}\)\{5\}'
	00:50:B6:80:4D:5Djim-desktop


2. This issue is very puzzling. The code which works as expected in terminal bombs when used in C++. Now the hcitool has "build in" delay when "scan" is implemented. That is NORMAL Bluetooth "inquiry response" behavior. When used as "hcitool scan" it takes few seconds to detect the bluetooth device(s). The response shows up in stdout and in my case it is written to tmp file.
All normal.
The problem is "grep" - when output form scan is piped thru there is no output whatsoever.
It makes no difference if hcitool is implemented as "sudo" on not.
Only some unspecified hcitool commands actually need to be run as "sudo" , scan is not one of them.

I understand there are other "extracting" commands, however, I would prefer to resolve both of these issues using grep.

As always , help with code is very much appreciated.





system("sudo hcitool scan | grep '[[:xdigit:]]\{2\}:'2>&1  | tee /tmp/address.txt ");


modified 19-May-19 1:18am.

AnswerRe: analyze "grep" pipe Pin
Richard MacCutchan17-May-19 21:18
protectorRichard MacCutchan17-May-19 21:18 
QuestionHow to retrieve "terminal" output? Pin
Vaclav_17-May-19 7:26
memberVaclav_17-May-19 7:26 
AnswerRe: How to retrieve "terminal" output? Pin
Richard MacCutchan17-May-19 9:27
protectorRichard MacCutchan17-May-19 9:27 
QuestionMessage Removed Pin
15-May-19 7:41
memberVaclav_15-May-19 7:41 
QuestionTheoretical server/site setup Pin
pyango58-May-19 12:00
memberpyango58-May-19 12:00 
QuestionSOLVED "configure" script option PKG_CONFIG_DEBUG_SPEW fails to run on X86 Pin
Vaclav_4-May-19 3:51
memberVaclav_4-May-19 3:51 
GeneralRe: "configure" script option PKG_CONFIG_DEBUG_SPEW fails to run on X86 Pin
Richard MacCutchan4-May-19 4:56
protectorRichard MacCutchan4-May-19 4:56 
QuestionMessage Closed Pin
16-Apr-19 2:46
groupananyaganga16-Apr-19 2:46 
Questionmissing mount.pc Pin
Vaclav_12-Apr-19 3:49
memberVaclav_12-Apr-19 3:49 
AnswerRe: missing mount.pc Pin
Gerry Schmitz12-Apr-19 4:53
mveGerry Schmitz12-Apr-19 4:53 
GeneralRe: missing mount.pc Pin
Vaclav_12-Apr-19 7:53
memberVaclav_12-Apr-19 7:53 
QuestionBad UDP length 736 > IP payload length Len = 728 packet drop Pin
sarali8-Apr-19 18:35
membersarali8-Apr-19 18:35 
AnswerRe: Bad UDP length 736 > IP payload length Len = 728 packet drop Pin
Gerry Schmitz9-Apr-19 6:22
mveGerry Schmitz9-Apr-19 6:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.