Removing unseen junk characters from the file in unix

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am trying to remove unseen junk characters from the file which can be seen using cat -v . I got the script below in google but i am curious to know how the below command works .
tr -cd '111240-176' < Actual_file.txt > Actual_clean.txt
Thank you.
shell-script tr
add a comment |
up vote
0
down vote
favorite
I am trying to remove unseen junk characters from the file which can be seen using cat -v . I got the script below in google but i am curious to know how the below command works .
tr -cd '111240-176' < Actual_file.txt > Actual_clean.txt
Thank you.
shell-script tr
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to remove unseen junk characters from the file which can be seen using cat -v . I got the script below in google but i am curious to know how the below command works .
tr -cd '111240-176' < Actual_file.txt > Actual_clean.txt
Thank you.
shell-script tr
I am trying to remove unseen junk characters from the file which can be seen using cat -v . I got the script below in google but i am curious to know how the below command works .
tr -cd '111240-176' < Actual_file.txt > Actual_clean.txt
Thank you.
shell-script tr
shell-script tr
asked Nov 22 at 17:17
Rak kundra
153112
153112
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
It's an obtuse way of writing tr -cd 'tn -~' ...
-c means complement, -d means delete. That will delete all characters but tab, newline and the ASCII printable characters (starting with space and ending with tilde). See man ascii(7).
It will also delete printable utf-8 characters, which are used a lot on modern Unix system, so it's a bit over-the-top.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
It's an obtuse way of writing tr -cd 'tn -~' ...
-c means complement, -d means delete. That will delete all characters but tab, newline and the ASCII printable characters (starting with space and ending with tilde). See man ascii(7).
It will also delete printable utf-8 characters, which are used a lot on modern Unix system, so it's a bit over-the-top.
add a comment |
up vote
1
down vote
accepted
It's an obtuse way of writing tr -cd 'tn -~' ...
-c means complement, -d means delete. That will delete all characters but tab, newline and the ASCII printable characters (starting with space and ending with tilde). See man ascii(7).
It will also delete printable utf-8 characters, which are used a lot on modern Unix system, so it's a bit over-the-top.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
It's an obtuse way of writing tr -cd 'tn -~' ...
-c means complement, -d means delete. That will delete all characters but tab, newline and the ASCII printable characters (starting with space and ending with tilde). See man ascii(7).
It will also delete printable utf-8 characters, which are used a lot on modern Unix system, so it's a bit over-the-top.
It's an obtuse way of writing tr -cd 'tn -~' ...
-c means complement, -d means delete. That will delete all characters but tab, newline and the ASCII printable characters (starting with space and ending with tilde). See man ascii(7).
It will also delete printable utf-8 characters, which are used a lot on modern Unix system, so it's a bit over-the-top.
answered Nov 22 at 18:09
mosvy
4,881322
4,881322
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483494%2fremoving-unseen-junk-characters-from-the-file-in-unix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown