Questions tagged [od]
27 questions
7
votes
1 answer
How to identify duplicated ordered pairs efficiently
I'm working with origin-destination (OD) data that contains an origin ID and a destination ID in separate columns. Sometimes it's important to aggregate OD pairs that are the same, except that the origin and destination is swapped.
OD data looks…

RobinLovelace
- 4,799
- 6
- 29
- 40
3
votes
5 answers
How to turn a string into a modified hex representation?
i want to turn a string like
AaAa
into
a string like this
%<41>%<61>%<41>%<61>
Simple enough with the programming languages i am familar with, but with bash i can't get get the piping right to do what i am trying to do:
split string into char…

Dbl
- 5,634
- 3
- 41
- 66
1
vote
1 answer
Equivalent of a multi-type-struct od output
I can use od when I want to dump the contents of a non-textual file to a terminal (or a text file) as human-readable values: I can peer into files with elements of various types - signed or unsigned integers, floating point or printable ASCII. (You…

einpoklum
- 118,144
- 57
- 340
- 684
1
vote
1 answer
Unicode char representations in BASH / shell: printf vs od
I have two correlated ‘why’ —not ‘how to’— questions:
Question 1
While printf and od produce same decimal, octal, and hex representations for ASCII characters —
ascii_char=A
printf "%d" "'$ascii_char"
65
echo -n $ascii_char | od -A n -t d1
…

KiriSakow
- 957
- 1
- 12
- 22
1
vote
2 answers
Octal dump in Linux shell without od or hd
I'm trying to control a Kasa Smartplug from an Axis embedded Linux product by following what George Georgovassilis has done here: https://blog.georgovassilis.com/2016/05/07/controlling-the-tp-link-hs100-wi-fi-smart-plug/
I've managed to switch the…

Prometheus
- 11
- 1
1
vote
0 answers
od output format on Android phone
I'm trying to inspect a binary on my Android handset. The handset is rooted
and I'm talking to it through adb.
The first few bytes of the file in question show as
37777776620 042577 043114 000401 000001 000000 000000 000000 …

Anbaric
- 11
- 4
1
vote
1 answer
Why does od linenumber increment by 2?
Example:
od /bin/bash | head -n4
Gives the output
0000000 042577 043114 000402 000001 000000 000000 000000 000000
0000020 000002 000076 000001 000000 002540 000102 000000 000000
0000040 000100 000000 000000 000000 146600 000017 000000…

Gustav Blomqvist
- 161
- 1
- 12
0
votes
1 answer
How to construct file from octal dump?
How do I parse od output to reconstruct the original binary file ?
Can it be done with an existing tool (eg. xxd (which appears to be hex only)) ?
Or with Sed/Awk/Perl/Python (or other scripting language) ?
If so, then please provide a working…

mvanle
- 1,847
- 23
- 19
0
votes
1 answer
xxd vs od - little/big endian or something else going on
I am looking at a compiled java file on Ubuntu 22.04.
On bash, when i say xxd A.class, i get a hexdump that begins with cafe babe - this is what i expect.
But if i say od -x A.class, i get feca beba - why?
As an additional puzzler, both if is say…

bukwyrm
- 186
- 6
0
votes
0 answers
Using R library "od", od_to_odmatrix is generating "subscript out of bounds"
Trying to adapt the examples from here:
An Introduction to origin-destination data
Data I'm trying to work with looks like this (3 columns, 6 rows),
structure(list(Shed.x = c(3, 3, 8, 8, 8, 8), Shed.y = c(3, 29,
39, 74, 83, 84), Num = c(1, 1, 1, 1,…

Mox
- 511
- 5
- 15
0
votes
0 answers
How do DEFSTRUCT and DEFTYPE work in CanOpen ODs and EDS?
I need to implement a device with custom DEFTYPE and DEFSTRUCT where using them is mandatory, but I cannot put my finger on how to implement them.
How do I create and use DEFSTRUCT and DEFTYPE in OD?
What are they used for?
Went through about 100…

Zeusz0
- 23
- 2
0
votes
1 answer
How to create an Origin-Destination matrix in R for multiple observations tied to unique ID?
Here I have a sample dataset and my goal is to generate matrices (explained below)
ID <- c(1,1,1,
2,2,
3,3,3,3,3,3,
4,4,4,
5,5,5,5,5,5)
OZ <- c("OZ1", "OZ1", "OZ3",
"OZ3", "OZ3",
"OZ1", "OZ3", "OZ1",…

Tathagato
- 348
- 1
- 11
0
votes
1 answer
Google ASR with Avaya OD Orchestration Designer
We are using Google speech to text API from avaya OD. It works fine. We make use of record tag to record user speech input send the audio file using Google speech API to convert it into text .HOWEVER, the recording of user input starts after playing…

arunpatil1988
- 23
- 5
0
votes
1 answer
How can I dump a file of float values to the command-line?
I have a file containing a raw sequence of 4-byte floating-point values - no headers, no formats, nothing else. I want to print some the float values in human-readable format, say from the n_1'th float to the n_2'th float, inclusive.
What's a simple…

einpoklum
- 118,144
- 57
- 340
- 684
0
votes
1 answer
Make OD file in sumo using Node instead of TAZ
I have data of a network (siouxfalls) and want to make simulation with it in SUMO.
For OD file, I have the demand between each node (not the links):
https://github.com/bstabler/TransportationNetworks/blob/master/SiouxFalls/SiouxFalls_trips.tntp
As I…

RKouhi
- 5
- 1