[Bash] How to decode Octal code on Debian

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
f1izzzy
Posts: 5
Joined: 2025-01-30 15:21
Location: Uzbekistan, Tashkent
Has thanked: 2 times

[Bash] How to decode Octal code on Debian

#1 Post by f1izzzy »

Hi everyone, Initially, thank you for responding.

I searched a lot but didn't find how to decode Octal code to text form in Debian with command line, I will appreciate a lot if someone respond and give some direction to do it. Thank you!

CwF
Global Moderator
Global Moderator
Posts: 3262
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 69 times
Been thanked: 288 times

Re: [Bash] How to decode Octal code on Debian

#2 Post by CwF »

Have a look at packages ascii, ascii2binary, bindechexascii, and a few hex editors maybe. Also some python or tcl libraries, and maybe even a few calculators can do it.
Mottainai

lindi
Debian Developer
Debian Developer
Posts: 646
Joined: 2022-07-12 14:10
Has thanked: 2 times
Been thanked: 129 times

Re: [Bash] How to decode Octal code on Debian

#3 Post by lindi »

In shell you can use for example

Code: Select all

printf "%d\n" 0213
to convert octal number 213 to decimal number 139. However, I would strongly suggest writing this in python so that your data stays private from other users of the system.

Aki
Global Moderator
Global Moderator
Posts: 4341
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 127 times
Been thanked: 583 times

Re: [Bash] How to decode Octal code on Debian

#4 Post by Aki »

Hello,
f1izzzy wrote: 2025-02-19 17:52 I searched a lot but didn't find how to decode Octal code to text form in Debian with command line
What exactly do you mean by "decode"? Do you want to convert from octal notation to what other notation (decimal, binary, hexadecimal, ...) and in what format (numeric, character, other, ...) ? Can you give an example ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply