Skip to content

Commit ee5f366

Browse files
committed
Updating description in b64_encode and adding b64_decode. Updating README.md
1 parent a91ede1 commit ee5f366

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The following are "recipes" for "run" commands that can be used with this image.
3636

3737
* Injecting data from "any" source into a mqtt broker using the standard brefv format (examplified by a multicast stream). Every UDP packet gets base64-encoded and packaged into a brefv envelope and then published to the broker:
3838
```
39-
socat -u UDP4-RECVFROM:60002,reuseaddr,ip-add-membership=239.192.0.2:enp2s0,fork SYSTEM:'base64 --wrap=0' \
39+
socat -u UDP4-RECVFROM:60002,reuseaddr,ip-add-membership=239.192.0.2:enp2s0,fork SYSTEM:echo $$(base64 --wrap=0) \
4040
| raw_to_brefv \
4141
| mosquitto_pub -l -t '<topic>'
4242
```

bin/b64_decode

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Command line utility tool for processing input from stdin. Each line on the
4+
# input stream is base64 decoded.
5+
6+
set -euo pipefail
7+
8+
while read -r line
9+
do
10+
echo "$line" | base64 --decode
11+
done

bin/b64_encode

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Command line utility tool for processing input from stdin. Each line on the
4-
# input stream base64 encoded with no wrapping and ended with a newline.
4+
# input stream is base64 encoded with no wrapping and ended with a newline.
55

66
set -euo pipefail
77

0 commit comments

Comments
 (0)