We're seeing copious amounts of 'NO-BREAK SPACE' (U+00A0) Unicode Characters in your file, represented as multibyte UTF-8 0xC2 0xA0 (or \302 \240 in octal) char. sed definitely is NOT the right tool to cope with those in general (although it might with single occurrences). What encodings does your Microsoft host use? What your *nix node?
Some conversion might already be done during transfer by using the right ftp options / settings. Or use the dos2unix tool. Or iconv or recode commands.
For exactly above problem,
Code:
sed 's/\o302\o240/ /g' /tmp/special_chars.txt
might suffice...
EDIT: I vaguely remember from your recent post that you are using Solaris (you don't mention it here). Not sure if any of above is available, then. YMMV.
Last edited by RudiC; 12-06-2018 at 07:12 AM..
Reason: typos
Hello
I am new to shell scripting and can anyone tell me how to check if there are any special characters in a file. Can i use grep ?
thanks
susie (2 Replies)
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)
Hi,
I have tonnes of .txt files that are written in French. I need to replace the French special characters, however, with English equivalents (e.g. é -> e and ç -> c).
I have tried this
---
#!/bin/bash
# Convert French characters to normal characters
# Treat each of the files
exec... (4 Replies)
Hello,
I have a file with many lines with below format:
\abc\\1234
jkl\\567
def\\345
\pqr\\567
\xyz\\234
Here, i need to do 2 things.
1. replace \\ with \
2. remove starting \
so output to be as below: (11 Replies)
HI all,
How can i rename some files and replace the special character in the name with todays date
ex: Name#file1.txt
Name#file2.txt
to be renamed as
Name.20091119.file1.txt
Name.20091119.file2.txt (11 Replies)
Hi,
I am trying to replace a string in shell but it is not working correctly.
@xcom.file@
needs to be replaced with
tb137
Plz help.Thx.
Please use and tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks. (4 Replies)
I am writing a ksh script. I need to replace a set of characters in an xml file.
FROM="ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÛÚÜÝßàáâãäåçèéêëìíîïðñòóôõö¿¶ø®";
TO="AAAAAAACEEEEIIIIDNOOOOOOUUUUYSaaaaaaceeeeiiiionooooo N R"
I have used the code- sed 's/$FROM/$TO/g'<abc.xml
But its not working.
Can anyone tell me the code to do this? (3 Replies)
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)
**Extremely sorry for the typos in heading
Old:CAST ('${DEFAULT_HIGH_DATE}' AS DATE FORMAT 'YYYY-MM-DD')
New :CAST(CAST('${G_DEFAULT_HIGH_DATE}' AS DATE FORMAT 'MM-DD-YYYY') as DATE FORMAT 'YYYY-MM-DD')
Need to change old format as new format
cat file1
CAST ('${DEFAULT_HIGH_DATE}' AS... (1 Reply)
Hi,
Does anyone know if there is a script or program available out there that uses a conversion table to replace special characters from a file?
I am trying to remove some special characters from a file but there are several unprintable/control characters that some I need to remove but some I... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT FREEBSD
phones
PHONES(5) BSD File Formats Manual PHONES(5)NAME
phones -- remote host phone number data base
DESCRIPTION
The file /etc/phones contains the system-wide private phone numbers for the tip(1) program. This file is normally unreadable, and so may
contain privileged information. The format of the file is a series of lines of the form: <system-name>[ ]*<phone-number>. The system name
is one of those defined in the remote(5) file and the phone number is constructed from any sequence of characters terminated only by ``,'' or
the end of the line. The ``='' and ``*'' characters are indicators to the auto call units to pause and wait for a second dial tone (when
going through an exchange). The ``='' is required by the DF02-AC and the ``*'' is required by the BIZCOMP 1030.
Only one phone number per line is permitted. However, if more than one line in the file contains the same system name tip(1) will attempt to
dial each one in turn, until it establishes a connection.
FILES
/etc/phones
SEE ALSO tip(1), remote(5)HISTORY
The phones file appeared in 4.2BSD.
BSD June 5, 1993 BSD