The ascii tag has no usage guidance.
0
votes
1answer
45 views
Does gzip removes ASCII values
I have a txt file in which i have multiple ASCII values.Like the below one which is the example :
including complimentary high-speed internet access, in-room hospitality center with microwave, ...
1
vote
2answers
33 views
Keystrokes for ASCII control codes
Okay, so I've recently realized the correspondence between Control keystrokes and ASCII control codes, e.g. ^D sends the EOT character because EOT is ASCII code 4 and D is the fourth letter in the ...
4
votes
4answers
379 views
How do I print an ASCII character by different code points in Bash?
In the ASCII table the 'J' character exists which has code points in different numeral systems:
Oct Dec Hex Char
112 74 4A J
It's possible to print this char by an octal code point by ...
1
vote
1answer
11 views
locate outputs question marks when locatedb contains certain characters (tabs) unless output is piped
I construct my own locatedb using frcode so it would contain filesizes after paths (it helps me look for large files quickly). I store the path separated from the size by a tab character. I've noticed ...
1
vote
1answer
44 views
store file with invalid characters
Some files we get from a customer could not be processed properly because they were declared as US-ASCII but contained invalid characters. In order to validate a software fix, I am trying to copy ...
15
votes
2answers
2k views
Why doesn't the Enter key send EOL?
Unix / Linux EOL is LF, linefeed, ASCII 10, escape sequence \n.
Here's a Python snippet to get exactly one keypress:
import sys, tty, termios
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(...
1
vote
2answers
49 views
ERROR: integer expression expected - comparing tables
I have a small bash program, that allows me to compare tables (having similar naming style) and that copies to another directory the file having the highest value at the first row of the fourth column ...
0
votes
1answer
43 views
Display non-printable parameters in running processes
ps aux displays commands running on the server, but it does not display non-printable parameters in any sort of way that is useful.
mycmd.sh:
#!/bin/bash
while true
do
sleep 5
done
...
2
votes
2answers
211 views
How to convert an special hex character from an html page in bash? [duplicate]
I have a script which process some information coming from a web page. I guess that because of the encoding of the page, some special characters are encoded in hexadecimal.
For example, I have the the ...
1
vote
1answer
49 views
What happens when I echo with `-e` argument?
As you can see, I have created index.php as follows:
$ echo -e "<?php passthru(\$_POST[1])?>\r<?php echo 'A PHP Test ';" > index.php
and then:
$ cat index.php
<?php echo 'A PHP Test '...
0
votes
1answer
1k views
blessdiff for the “full featured hexadecimal editor”?
I am trying to find some hex diftool which allows me to compare to documents in the view but also the internal differences like in bless so two bless windows side-by-side but with diff capability ...
2
votes
4answers
1k views
How to produce a CR/LF in linux text docs? [closed]
How do you produce a CR/LF anywhere in a text document created in linux OS so that it can be copied and pasted into a windows text editor or onto the web and retain the CR/LF to be read and acted upon ...
3
votes
3answers
57 views
printing a series of characters
My ultimate goal here is to generate a block of text that can be used to test out various fonts at a terminal. I want to generate the file as basically an ascii chart. A series of characters from 1 ...
1
vote
0answers
589 views
USB bar code scanner not working on Raspbian
My USB bar code scanner (SYMBOL LS2208) is recognized as a HID.
hid-generic 0003:05E0:0600.000F: hiddev0,hidraw0: USB HID v1.10 Device [\xffffffef\xffffffbe\xffffffa9\xffffffbe\xffffffa9Symbol ...
1
vote
4answers
1k views
How to recognize which ASCII character in hex is this?
We have a textfile that we want to clear from "bad" characters. If we open it with vim (with ":set number"):
57000044 zo¥<9a>¥ge¥o¥graph¥i¥cal¥ly
39999999 pariá¹<83>Å<9b>a
The ex.:...
0
votes
1answer
501 views
Convert serialized Java object to human readable
I have object of class
class X {
private DateTime dt;
"constructor, set/get"
}
I have one instance of this object serialized in file.bin.
I want to show content of `file.bin on the Linux ...
1
vote
2answers
882 views
Conversion of plain-text files from ASCII to Unicode without any command
Why are ASCII-encoded files extended to UTF-8 or in reverse reduced to ASCII?
user:~$ echo 'A B C | } ~' > ./file
user:~$
user:~$ file --brief --mime ./file
text/plain; charset=us-ascii
...
1
vote
1answer
7k views
Converting a file from ASCII to Binary
I have a series of files that are either delimited and fixed width, containing many rows of both character and numeric values like so (delimited example):
Smith,Audrey,Ford,2000,21300.99
Miller,Heath,...
5
votes
2answers
656 views
Generating file with ASCII numbers using /dev/urandom?
How can I generate 10 MB files from /dev/urandom filled with:
ASCII 1s and 0s
ASCII numbers between 0 and 9
2
votes
1answer
2k views
Removing non-printable characters using POSIX sed
Files created with roff and other "old-school" tools (for example man pages on many Unix systems) generate bold and underlined text in minimalistic terminals using tricks involving non-printable ASCII ...
0
votes
0answers
834 views
set the default keyboard type to ascii mode
I am running CentOS 6.5 and I am having problems setting the default keyboard mode to ascii for the virtual terminals. Currently, only the system console defaults to ascii mode, but if I log in to an ...
15
votes
3answers
9k views
Why is the unit separator (ASCII 31) invisible in terminal output?
The unit separator ASCII character (ASCII 31, octal 37), is visible in Vim as a ^_. But if I print the same file to the terminal, the character is invisible. This causes the fields on a line to get ...
21
votes
2answers
10k views
“tree” command output with “pure” (7-bit) ASCII output
The "tree" command uses nice box-drawing characters to show the tree but I want to use the output in a "code-page-neutral" context (I know that really there's always a code page, but by restricting it ...
6
votes
2answers
4k views
Can vim display ASCII characters only, and treat other bytes as binary data?
I already know vim -b, however, depending on the locale used, it displays multi-byte characters (like UTF-8) as single letters.
How can I ask vim to only display ASCII printable characters, and ...
30
votes
8answers
30k views
Bash script to get ASCII values for alphabet
How do I get the ASCII value of the alphabet?
For example, 97 for a?
1
vote
2answers
232 views
Sed script inserting and appending in wrong place only in one particular place
I am trying to convert man pages to tex, and I keep getting
\item[
in the beginning of the file and
] \hfill \\
After the part of the man pages where it shows ENV(1L). Everything else seems to be ...
2
votes
3answers
2k views
ASCII art generator
I'm looking for an ASCII art generator (text is preferred, but images will do too) in the sl style, but with text instead of trains. Any suggestion?
4
votes
2answers
4k views
Align columns in ASCII file
I have a text file that looks like his:
#c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13
4599 995,274 2523,658 ...
1
vote
1answer
621 views
Convert discus output into readable HTML mail
How can I take the DISCUS command output below:
and convert it into something HTML email friendly? I've bash scripted something like this:
#!/bin/sh
discus > /tmp/discus.log
touch /tmp/diskchart....
6
votes
5answers
7k views
How do you write specific bytes to a file?
Given a file myfile with the following contents:
$ cat myfile
foos
A hexdump of the file gives us the contents:
$ hexdump myfile
6f66 736f 000a
Currently, I can create the file by specifying the ...
10
votes
2answers
13k views
Printing decimal to ascii character, my command does not output as intended
I wanted to output a string of all the ascii characters with the following command
for i in `seq 32 127`; do printf "%c" $i; done
The output of the above command is:
...
1
vote
2answers
191 views
Shell script to detect PDFs with non-ASCII contents
I need a shell script to detect valid PDFs. That is, I need to retain only plain ASCII PDFs. Other PDFs which contain non-ASCII contents and malicious scripts need to be deleted. How could I go about ...
2
votes
3answers
2k views
How can I find all ascii files under one directory that have the word shirt in them? Starting from root
What command would I use to find all of the files under the girl directory that have the ascii text “shirt” inside the files, starting from the root directory?
0
votes
1answer
325 views
Image (having text-and-numbers) to text-file matching [:alnum:] nicely with some Unix -tool?
Suppose a photograph with text and numbers. I want to manage it in my editor with tools such as grep, standard text-processing things such as Vim's block-highlighting and also more advanced things ...
4
votes
2answers
992 views
How is the octal 2-byte output calculated from od
I'm struggling to work out what the octal 2-byte output from the od command is. I understand the octal output (-b flag) but the octal 2-byte is a mystery to me (-o)
Can someone shed some light on how ...
6
votes
1answer
250 views
Which tools for ASCII portfolio visualization?
I. I want to do a simple graph from timestamp YEAR-month-day to valuation, not wanting to use spreadsheets. Is there some ASCII tool for it to see it on CLI? There are over 500k lines of data, and I ...