Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [control-characters]

The tag has no usage guidance.

5
votes
2answers
70 views

What determines whether backspaces show up in a file created with cat?

I just noticed that I've seen different behavior across different systems when creating a quick test file (e.g. with sample input) via cat and redirection. Here are the steps to see what I'm talking ...
1
vote
3answers
65 views

How to find control characters in a file?

I want to find what control characters are in my file. I do not search for specific character, but it is possible \t or \n. I have a program that is telling me: Invalid control character. But when I ...
1
vote
2answers
31 views

Multi-file multi-directory removal of ^@

I have multiple files in multiple subdirectories where I need to remove all instances of the control character "^@". Just a basic grep doesn't seems to be working. This what I've tried most ...
0
votes
0answers
35 views

when can I view \t as a character which spans a fixed width, instead of a control character which jumps to the next tab stop?

I always thought \t as a character, and never realize they are used by terminals for column/field alignment, until Stephane said What does `pr -e` mean? printf '%b' '\t' or printf '\t' writes a ...
1
vote
1answer
293 views

tmux: backspace and ctrl-backspace send both ^?

With FreeBSD 11.1 and tmux 2.7, pressing ← (backspace) sends ^? and ctrl+← does also send ^?. The default behavior (no tmux) is: ^H for ← ^? for ctrl+← How can I get this default behavior with ...
0
votes
1answer
372 views

What is this sequence of control characters (M-bM-^TM-^@) (dashes)? How can I transform these? [closed]

I have a 'typescript' file that if i cat -v I get the following within the output: M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-^TM-^@M-bM-...
-2
votes
1answer
1k views

How to find invalid characters? [closed]

I am trying to filter out record which is having "invalid character"(like control-m ^M characters or simply not valid characters). Example: 12345 vimal 1235566 ^zfood nation Here, the ^z, which in ...
1
vote
0answers
96 views

How to stop python-based borg backup from logging with ^M

I'm trying to make a log file for monitoring backup progress using borg deduplicating archiver. While I am logging, the file contains ^M control characters for each line despite running the script on ...
2
votes
0answers
73 views

Show colors from child shell in parent shell

I solved this once, but I cannot remember how I did! In my child process, I have this: echo -e "some control chars" In my parent process, it will show the plain string, without any terminal styling....
-1
votes
3answers
248 views

Get colors in bash shell [duplicate]

I have this: ql_gray='\033[1;30m' ql_magenta='\033[1;35m' ql_cyan='\033[1;36m' ql_orange='\033[1;33m' ql_green='\033[1;32m' ql_no_color='\033[0m' I use them like so: echo "${ql_magenta}quicklock: ...
1
vote
1answer
101 views

What does an application read when the user press a backspace in the terminal in raw mode?

In raw mode, if you type a character in the terminal, the application on the other side will read the ASCII code for the typed character. But what about when you press the backspace key in the ...
0
votes
2answers
233 views

Prevent the line discipline from handling control characters

When you send a control character from the terminal, for example if you pressed Ctrl+C, the line discipline will receive the byte representing this control character (which is 0x03 in the case of Ctrl+...
0
votes
1answer
57 views

Why do colors not show up (control characters) when piping stdout/stderr on *nix systems?

Why do colors not show up (control characters) when piping stdout/stderr on *nix systems? When I do: foo | bar if foo writes color encoded strings (with control chars) to stdout, they won't show up ...
11
votes
4answers
2k views

Determine how long tabs '\t' are on a line

In a text processing field is there a way to know if a tab is 8 characters in length (the default length) or less? For example, if I have a sample file with tab delimiter and the content of a field ...