02-07-2019
Hi Rakesh,
You say that the letter M at the end of each input line is special and has to be removed. The letter M can't be removed if you say it is not special. We can't possibly meet your requirements if your requirements are inconsistent.
If you want to change your requirements to only remove sequences of characters that are not a space character and that are not alphanumeric characters from the end of each input line, the output produced from your sample input will be identical to the input because the last character is an alphanumeric character!
You had several suggestions earlier that, among many other things, removed all non-alphanumeric characters from the end of field 15 or from the end of the input record and you rejected all of them because they didn't get rid of trailing M.
I give up!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
We have a unix file that contains special characters (ie. Ñ, °, É, ¿ , £ , ø ). When I try to read this file I get a codepage error and the characters are replaced by the # symbol. How do I keep the special characters from being read?
Thanks.
Ryan (3 Replies)
Discussion started by: Ryan2786
3 Replies
2. UNIX for Dummies Questions & Answers
I don't now exactly how I did it, but I created a file named " -C "
cexdi:/home1 $ls -lt
total 1801336
-rw------- 1 cexdi ced-group 922275840 23 mars 10:03 -C
How do I delete this file ?
cexdi:/home1 $rm -C
rm: invalid option -- C
Syntax : rm filename ...
Doesn't work...... (5 Replies)
Discussion started by: yveslagace
5 Replies
3. UNIX for Dummies Questions & Answers
need some advice on the following situation.
I have a DB2 table which has a varchar Column. This varchar column can have special characters like ©, ®, ™ .
When I extract from this table to a sequential file for this varchar column I am only able to get © and ® .
To Get the ™... (1 Reply)
Discussion started by: cosec
1 Replies
4. Shell Programming and Scripting
Hi all,
I have the following lines
<b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
<b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text)
and I would like to... (5 Replies)
Discussion started by: stinkefisch
5 Replies
5. Shell Programming and Scripting
Hello Team,
Any one suggest how to delte the below special character from a file which is having one column 10 rows of same below content.
----------------------------------------
Kosten|bersicht gemd_ ' =Welche Kosten kvnnen... (2 Replies)
Discussion started by: kanakaraju
2 Replies
6. Shell Programming and Scripting
I have a file that has the name in one of the lines as MARíA MENDOZA in Windows. When this gets FTPed over to UNIX it appears as MAR�A MENDOZA. Is there anyway to overcome this? Its causing a issue because the file is Postional and fields are getting pushed by 2 digits..
Any help would be... (4 Replies)
Discussion started by: venky338
4 Replies
7. Shell Programming and Scripting
Need unix commands to delete records from one file if the same record present in another file...
just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file..
tried with grep and while... (6 Replies)
Discussion started by: msathees
6 Replies
8. Shell Programming and Scripting
Hi,
How to add trailer record at the end of the flat file in the unix ksh shell scripting
can you please let me know the procedure
Regards
Srikanth (3 Replies)
Discussion started by: srikanth_sagi
3 Replies
9. Shell Programming and Scripting
Any time I do :
ls *.txt > mytext.txt
I get something like this in the output file:
^
Tue Jan 22 16:19:19 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
t1Fam_BrOv :~>alias | grep ls
alias l.='ls -d .* --color=tty'
alias lR='ls -R'
alias la='ls -Al'
alias lc='ls -ltcr'
alias ldd='ls -ltr |... (5 Replies)
Discussion started by: genehunter
5 Replies
10. Shell Programming and Scripting
My sed is not working on deleting the entire special characters and leaving what is necessary.grep connections_per a|sed -e 's/\<\!\-\-//g'
INPUT:
<!-- <connections_per_instance>1</connections_per_instance> -->
<method>HALF</method>
<!--... (10 Replies)
Discussion started by: kenshinhimura
10 Replies
LEARN ABOUT DEBIAN
utf8trans
utf8trans(1) docbook2X utf8trans(1)
NAME
utf8trans - Transliterate UTF-8 characters according to a table
SYNOPSIS
utf8trans charmap [file]...
DESCRIPTION
utf8trans transliterates characters in the specified files (or standard input, if they are not specified) and writes the output to standard
output. All input and output is in the UTF-8 encoding.
This program is usually used to render characters in Unicode text files as some markup escapes or ASCII transliterations. (It is not in-
tended for general charset conversions.) It provides functionality similar to the character maps in XSLT 2.0 (XML Stylesheet Language -
Transformations, version 2.0).
OPTIONS
-m, --modify
Modifies the given files in-place with their transliterated output, instead of sending it to standard output.
This option is useful for efficient transliteration of many files at once.
--help Show brief usage information and exit.
--version
Show version and exit.
USAGE
The translation is done according to the rules in the 'character map', named in the file charmap. It has the following format:
1. Each line represents a translation entry, except for blank lines and comment lines, which are ignored.
2. Any amount of whitespace (space or tab) may precede the start of an entry.
3. Comment lines begin with #. Everything on the same line is ignored.
4. Each entry consists of the Unicode codepoint of the character to translate, in hexadecimal, followed one space or tab, followed by the
translation string, up to the end of the line.
5. The translation string is taken literally, including any leading and trailing spaces (except the delimeter between the codepoint and
the translation string), and all types of characters. The newline at the end is not included.
The above format is intended to be restrictive, to keep utf8trans simple. But if a XML-based format is desired, there is a
xmlcharmap2utf8trans script that comes with the docbook2X distribution, that converts character maps in XSLT 2.0 format to the utf8trans
format.
LIMITATIONS
o utf8trans does not work with binary files, because malformed UTF-8 sequences in the input are substituted with U+FFFD characters. Howev-
er, null characters in the input are handled correctly. This limitation may be removed in the future.
o There is no way to include a newline or null in the substitution string.
AUTHOR
Steve Cheng <stevecheng@users.sourceforge.net>.
docbook2X 0.8.8 3 March 2007 utf8trans(1)