Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to enter special characters in a text file using vi? Post 302955256 by newbie_01 on Tuesday 15th of September 2015 07:15:37 PM
Old 09-15-2015
How to enter special characters in a text file using vi?

Hi,

I need to create a test text file with the special characters \342\200\223 in it and to be able to use sed maybe to delete them

I tried doing it using vi by pressing CTRL-V and then typing 342 but it does not work. After pressing CTRL-V and typing 342 it seems to just insert the numbers 342 in it, tried doing CTRL-V and then \342 does not work either.

Eventually, I would want to search and delete all non-printable characters but at the moment, this is what I am wanting to test on as these characters appear intermittently in a file that I am trying to load into the database.

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to see special characters in a file using vi

Hi, I have a file which has special characters. I can't see them when I "vi" the file. But I am sure there are some special un seen characters. How can I see them? Please help. Thx (6 Replies)
Discussion started by: jingi1234
6 Replies

2. Shell Programming and Scripting

remove special characters from text using PERL

Hi, I am stuck with a problem here. Suppose i have a variable which is assigned some string containing special charatcers. for eg: $a="abcdef^bbwk#kdbcd@"; I have to remove the special characters using Perl. The text is assigned to the variable implicitly. How to do it? (1 Reply)
Discussion started by: agarwal
1 Replies

3. Shell Programming and Scripting

sed usage with special characters - text manipulation

I'm trying to use sed to replace string in text file but I've some problems with slash and new-line for example I have to replace this string: \> signal_rssi=" or this string where new-line is in the middle of the string: " /> I'm using this code for the first case but it doesn't... (10 Replies)
Discussion started by: TheMrOrange
10 Replies

4. Shell Programming and Scripting

Remove special characters from text file

Hi All, i am trying to remove all special charecters().,/\~!@#%^$*&^_- and others from a tab delimited file. I am using the following code. while read LINE do echo $LINE | tr -d '=;:`"<>,./?!@#$%^&(){}'|tr -d "-"|tr -d "'" | tr -d "_" done < trial.txt > output.txt Problem ... (10 Replies)
Discussion started by: kkb
10 Replies

5. Shell Programming and Scripting

Adding text to file on certain lines with(special characters)

I need to add "new lines" of text with special characters, to specific lines in the file. There are 3 modifications needed. Been testing 2 here without success. #!/usr/bin/perl use FileHandle; $file=FileHandle->new; $FILENAME="/opt/etc/usr/file.txt"; $file->open ("<$FILENAME") or die... (13 Replies)
Discussion started by: A4ron4perl
13 Replies

6. UNIX for Dummies Questions & Answers

find text enclosed between special characters

Hi, I'm trying to find all DISTINCT words having _mr in the line and ENCLOSED in '/'. For eg below is the text in a file.. /database/new_mr254/1 /database/rawdb/views/new_mr254/1 /database/project/rawdb/tables/new_mr232/1 /database/project/rawdb/views/new_mr253/1... (5 Replies)
Discussion started by: northwest
5 Replies

7. Shell Programming and Scripting

File containing special characters

Hello All, I am facing challenges in order to transfer a file from windows to unix box,the file contains a special character '×' ,now when I am transferring the file from windows to unix that special character converted to something else like 'Ã' ,another thing I have noticed that the hardware is... (1 Reply)
Discussion started by: prarat
1 Replies

8. Shell Programming and Scripting

Remove Special Characters Within Text

Hi, I have a "|" delimited file that is exported from a database. There is one column in the file which has description/comments entered by some application user. It has "Control-M" character and "New Line" character in between the text. Hence, when i export the data, this record with the new... (4 Replies)
Discussion started by: tarun.trehan
4 Replies

9. UNIX for Dummies Questions & Answers

Search special characters in a file and replace with meaningful text messages like Hello

Search special characters in a file and replace with meaningful text messages like Hello (2 Replies)
Discussion started by: raka_rjit
2 Replies

10. UNIX for Beginners Questions & Answers

Rename File Name with Special Characters

I am trying to rename files with spaces and other characters and not able to be successful. FileNames: UPLOAD REFERENCE.xls UPLOAD MASS REFERENCE.XLS find /UPLOAD REFERENCE/ -depth -type f -name "* *" -exec rename " " "_" "{}" ";" The above one is successful to replace spaces... (1 Reply)
Discussion started by: eskay
1 Replies
trans(1)						      General Commands Manual							  trans(1)

NAME
trans - translation tool for use with source message catalogs SYNOPSIS
trans [-c] [-o name] file.msg OPTIONS
Display comment lines beginning with a dollar sign ($) for translation, in addition to messages. Call the output file name. The default is output file name is trans.msg. DESCRIPTION
The trans command assists in the translation of source message catalogs. The command reads input from file.msg and writes its output to either a file named trans.msg or a file you name on the command line. The command displays file.msg in a multiple window screen that lets you simultaneously see the original message, the translated text you enter, and any messages from the trans command. This multiple window screen is easier to use for translating messages than a single window screen. The top window in the multiple window screen displays the text in the message source file file.msg. The editor displays the current message in reverse video. In the center window, trans displays a prompt that asks you to enter a translated message. You use a control key editor to move the cursor and delete text in the center window. The control key sequences are defined as follows: ------------------------------------------ Key Sequence Meaning ------------------------------------------ CTRL/k Display control key help CTRL/h Back space CTRL/l Forward space CTRL/w Back word CTRL/f Forward word CTRL/e Move to end of input CTRL/b Move to beginning of input CTRL/n Next line CTRL/p Previous line CTRL/u Delete input CTRL/i Insert mode (default) CTRL/r Replace mode DEL Delete previous character ------------------------------------------ If you need to span more than one line with the translated text, type a backslash () and press the RETURN key to enable line continuation. After you finish entering the translated text, press the RETURN key to signal that you have finished translating that message. The bottom window displays any messages generated by trans. If an error occurs, trans prompts you to re-enter the entire line, including the message label or number. RESTRICTIONS
Your terminal must be 80 columns by 24 lines for trans to display its three-window screen. You cannot interrupt a trans session and restart it at the point you stopped. You must complete the all the changes to a file before exit- ing a file. SEE ALSO
extract(1), gencat(1), strextract(1), strmerge(1) Writing Software for the International Market trans(1)
All times are GMT -4. The time now is 05:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy