Linked Questions
14 questions linked to/from Integer ASCII value to character in BASH using printf
14 votes
2 answers
34k views
shell script - is there any way converting number to char? [duplicate]
Possible Duplicate: Integer ASCII value to character in BASH using printf I want to convert my integer number to ASCII character We can convert in java like this: int i = 97; //97 is "a"...
0 votes
2 answers
208 views
How do i iterate all ASCII to use them as variable? [duplicate]
I have a binary "crackme" which i want to try all ASCII characters as parameters, here's what i've done so far. #!/bin/bash ...
-1 votes
2 answers
725 views
Convert numbers to alphabets [duplicate]
I wanted to convert the numbers from 1 to 26 to Latin alpgabet {a-z}. 1 correspnds to "a", and 2 to "b" and 26 to "z" The following command only works for single digit numbers: echo "$i" | tr ...
0 votes
0 answers
357 views
Print character in a Linux shell by id using printf [duplicate]
I'm missing some characters in my keyboard, so I'd like to know how to print a character in the Bash shell using the ASCII character id. For example, the character '{' has the ASCII code 123. Using C'...
-1 votes
2 answers
231 views
Convert a file of decimal numbers to the ASCII equivalent [duplicate]
I can convert a text file to a list of ASCII decimals like this: $ echo "hello" | od -An -td1 -v -w1 104 101 108 108 111 10 What is the inverse operation? How can I convert the ...
2 votes
3 answers
9k views
Generate random char in bash
I need to generate a huge text. I'm using bash and I want to convert an integer number like 65 to a char like A. So I use random value between 0 and 255 (I need all the ASCII table), convert to a ...
0 votes
5 answers
5k views
Rename folder name in bash
I need to rename the following folders: d_001_d d_001_h d_005_d d_005_h d_007_d d_007_h In: d_a_d d_a_h d_b_d d_b_h d_c_d d_c_h So basically each code number correspond to a ...
6 votes
3 answers
1k views
Comparing strings for alphabetical order in Bash, test vs. double bracket syntax
I am working on a Bash scripting project in which I need to delete one of two files if they have identical content. I should delete the one which comes last in an alphabetical sort and in the example ...
1 vote
2 answers
3k views
how to stdin any byte (0-255)?
I have a very simple following code which gets 4 bytes from stdin and prints them out byte by byte in hex format. // Code may be different but the point is to input any byte value 0 to 255 from stdin ...
2 votes
5 answers
541 views
Is there a way to implement a counter in bash but for letters instead of numbers?
I'm working with an existing script which was written a bit messily. Setting up a loop with all of the spaghetti code could make a bigger headache than I want to deal with in the near term. Maybe when ...
0 votes
2 answers
2k views
Find specific cell from space-separated CSV file in bash
I have a question related to bash operating on comma-separated value files (.csv) saved with spaces as the selected separator. As an example I'll put small .csv file here: A B C D 1 a b c ...
2 votes
2 answers
998 views
Substitute values with ascii chars using sed
We have files with some chars represented by decimal(!) ascii values enclosed in cid(#) as e.g. (cid:104) for h. The string hello is thus represented as (cid:104)(cid:101)(cid:108)(cid:108)(cid:111). ...
-2 votes
3 answers
744 views
increment a letter sequence to represent a whole number where a=0 and z=25
I have tried several different search terms but have not found exactly what I want, I am sure there is already an answer for this so please point me to it if so. I would like to understand how to ...
0 votes
1 answer
299 views
How to print symbol using variable with code of that symbol? [duplicate]
I need to output a symbol using variable that contains code of that symbol. I already understood that in my code example bash thinks that i'm giving it a string. So according to specificator it ...