09-30-2002
The vi command that you want is:
:1,$s/.^H//g
And since % is the same as 1,$, I like:
:%s/.^H//g
As ganti (almost) points out the ^H a control-v and a control-h.
And you need that dot. man is using stuff like "_^Hx" to output an underscore, then a backspace and finally an "x". On some devices this will result in an underlined x. If that's not possible, the x will overwrite the underscore. That's why you need to delete the character comes before the ^H.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
using c-shell, does anyone know how to send control characters to the printer before the job?
I need to set a printer to print in condensed mode
HELP (1 Reply)
Discussion started by: mglinsk
1 Replies
2. UNIX for Dummies Questions & Answers
how can i get rid of the control characters , ex. ^M, ^G, in a file?
thanks... (2 Replies)
Discussion started by: apalex
2 Replies
3. Shell Programming and Scripting
I have a file with millions of records...Before I experiment, I would like to know which one is faster.
Both the commands work absolutely fine on a smaller set of records.
Please advice.
sed 's/^M//g' ${INPUT_FILE} > tmp.txt
mv tmp.txt ${INPUT_FILE}
tr -d "\15" < ${INPUT_FILE} > ... (11 Replies)
Discussion started by: madhunk
11 Replies
4. Shell Programming and Scripting
Hi,
Can anyone help me with controlling the cursor position from a shell script. Things like moving left,right,up,down etc
Anyone have any ideas? (2 Replies)
Discussion started by: ajcannon
2 Replies
5. Shell Programming and Scripting
Can somebody please help me with the query. ?
I want a part of program of which should look for control characters in the flat file , when it finds it, displaying message that Control Characters found..!
Please help me (1 Reply)
Discussion started by: iamnoone
1 Replies
6. Shell Programming and Scripting
Can somebody please help me with the query. ?
I want a part of program of which should look for control characters in the flat file , when it finds it, displaying message that Control Characters found..!
Please help me (13 Replies)
Discussion started by: iamnoone
13 Replies
7. Shell Programming and Scripting
sed -e "s// /g" old.txt > new.txt
While I do know some control characters need to be escaped, can normal characters also be escaped and still work the same way? Basically I do not know all control characters that have a special meaning, for example, ?, ., % have a meaning and have to be escaped... (11 Replies)
Discussion started by: ijustneeda
11 Replies
8. Shell Programming and Scripting
Hi,
Please excuse for posting new thread on control characters,
I am facing some difficulties in removing the control character from a file extracted from top command,
i am able to see control characters using more command and in vi mode, through cat control characters are not visible ... (8 Replies)
Discussion started by: karthikram
8 Replies
9. UNIX for Dummies Questions & Answers
Hi,
My files are showing some control characters in vi editor
^M
^@ and somtimes
^H
I removed ^M with %s/^M//g command
but how to represent ^@ and ^H
e.g. for ^M it is hold ctrl then v and m..
Please help..
I am very new to unix.. (7 Replies)
Discussion started by: prabhat.diwaker
7 Replies
10. Shell Programming and Scripting
Hallo Team,
I am trying to get rid of the dollar sign. I managed to remove all the other special characters but i am struggling with this one.
-bash-3.2$ cat -e missing_revenue_20141112.csv|less|head
BW0522168531211141180935668@196.23.110.141$
BW092218784121114-370120610@196.23.110.141$... (4 Replies)
Discussion started by: kekanap
4 Replies
LEARN ABOUT DEBIAN
xtokid
XTOKID(1) User Commands XTOKID(1)
NAME
xtokid - Print all tokens found in a source file
SYNOPSIS
xtokid [OPTION]... [FILE]...
DESCRIPTION
Print all tokens found in a source file.
-i, --include=LANGS
include languages in LANGS (default: "C C++ asm")
-x, --exclude=LANGS
exclude languages in LANGS
-l, --lang-option=L:OPT pass OPT as a default for language L (see below)
-m, --lang-map=MAPFILE
use MAPFILE to map file names onto source language
-d, --default-lang=LANG
make LANG the default source language
-p, --prune=NAMES
exclude the named files and/or directories
--files0-from=F
tokenize only the files specified by NUL-terminated names in file F
--help display this help and exit --version output version information and exit
The following arguments apply to the language-specific scanners:
C language:
-k,--keep=CHARS
Allow CHARS in single-token strings, keep the result
-i,--ignore=CHARS
Allow CHARS in single-token strings, toss the result
-u,--strip-underscore
Strip a leading underscore from single-token strings
C++ language:
-k,--keep=CHARS
Allow CHARS in single-token strings, keep the result
-i,--ignore=CHARS
Allow CHARS in single-token strings, toss the result
-u,--strip-underscore
Strip a leading underscore from single-token strings
Java language:
-k,--keep=CHARS
Allow CHARS in single-token strings, keep the result
-i,--ignore=CHARS
Allow CHARS in single-token strings, toss the result
-u,--strip-underscore
Strip a leading underscore from single-token strings
Assembly language:
-c,--comment=CHARS
Any of CHARS starts a comment until end-of-line
-k,--keep=CHARS
Allow CHARS in tokens, and keep the result
-i,--ignore=CHARS
Allow CHARS in tokens, and toss the result
-u,--strip-underscore
Strip a leading underscore from tokens
-n,--no-cpp
Don't handle C pre-processor directives
Text language:
-i,--include=CHAR-CLASS
Treat characters of CHAR-CLASS as token constituents
-x,--exclude=CHAR-CLASS
Treat characters of CHAR-CLASS as token delimiters
Perl language:
-i,--include=CHAR-CLASS
Treat characters of CHAR-CLASS as token constituents
-x,--exclude=CHAR-CLASS
Treat characters of CHAR-CLASS as token delimiters
-d,--dtags
Include documentation tags
Lisp language:
REPORTING BUGS
Report bugs to bug-idutils@gnu.org
xtokid - 4.5 August 2012 XTOKID(1)