Redirecting output from a bash command into a script
up vote
0
down vote
favorite
I'm trying to do some stuff with QR codes and a found a library called ZBar. Once installed it comes with a bash command called zbarcam which reads from a camera and continuously prints out whenever it scans and decodes a QR code (it prints out the decoded value of the QR). I want to, instead of printing the output, take the output and give it as an input to another script so I can do some things with it. TL;DR how can a continuously capture the output from zbarcam and pass it to my script as an input.
bash shell qr-code zbar
add a comment |
up vote
0
down vote
favorite
I'm trying to do some stuff with QR codes and a found a library called ZBar. Once installed it comes with a bash command called zbarcam which reads from a camera and continuously prints out whenever it scans and decodes a QR code (it prints out the decoded value of the QR). I want to, instead of printing the output, take the output and give it as an input to another script so I can do some things with it. TL;DR how can a continuously capture the output from zbarcam and pass it to my script as an input.
bash shell qr-code zbar
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to do some stuff with QR codes and a found a library called ZBar. Once installed it comes with a bash command called zbarcam which reads from a camera and continuously prints out whenever it scans and decodes a QR code (it prints out the decoded value of the QR). I want to, instead of printing the output, take the output and give it as an input to another script so I can do some things with it. TL;DR how can a continuously capture the output from zbarcam and pass it to my script as an input.
bash shell qr-code zbar
I'm trying to do some stuff with QR codes and a found a library called ZBar. Once installed it comes with a bash command called zbarcam which reads from a camera and continuously prints out whenever it scans and decodes a QR code (it prints out the decoded value of the QR). I want to, instead of printing the output, take the output and give it as an input to another script so I can do some things with it. TL;DR how can a continuously capture the output from zbarcam and pass it to my script as an input.
bash shell qr-code zbar
bash shell qr-code zbar
edited Nov 8 at 11:51
Rohit Verma
1,4332623
1,4332623
asked Nov 8 at 10:08
konstabtin konatantinov
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Is it from zbar?
They have an example in their manpage:
Scan for barcodes using the second video device and pipe the resulting data through a script that searches for each code in a database and does something useful with them:
zbarcam /dev/video1 | upcrpc.py
The upcrpc.py example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Is it from zbar?
They have an example in their manpage:
Scan for barcodes using the second video device and pipe the resulting data through a script that searches for each code in a database and does something useful with them:
zbarcam /dev/video1 | upcrpc.py
The upcrpc.py example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found.
add a comment |
up vote
0
down vote
Is it from zbar?
They have an example in their manpage:
Scan for barcodes using the second video device and pipe the resulting data through a script that searches for each code in a database and does something useful with them:
zbarcam /dev/video1 | upcrpc.py
The upcrpc.py example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found.
add a comment |
up vote
0
down vote
up vote
0
down vote
Is it from zbar?
They have an example in their manpage:
Scan for barcodes using the second video device and pipe the resulting data through a script that searches for each code in a database and does something useful with them:
zbarcam /dev/video1 | upcrpc.py
The upcrpc.py example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found.
Is it from zbar?
They have an example in their manpage:
Scan for barcodes using the second video device and pipe the resulting data through a script that searches for each code in a database and does something useful with them:
zbarcam /dev/video1 | upcrpc.py
The upcrpc.py example script included in the examples/ subdirectory of the distribution will make an XMLRPC call to a popular internet UPC database and print the product description if found.
answered Nov 8 at 12:03
seeseost
1826
1826
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205482%2fredirecting-output-from-a-bash-command-into-a-script%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password