In principle not too difficult:
, but you should be aware that these character graphics chars usually belong to a multibyte character set like utf-8 or so which may impose restrictions.
Hi,
How do I remove the lines where special characters or Unicode characters appear?
The following query does work but I wonder if there is a better way.
cat test.txt | egrep -v '\)|#|,|&|-|\(|\\|\/|\.'
The following lines show that my query is incomplete.
Warning: The word "*Khan" is... (1 Reply)
Hi there,
I'd like to write a script that removes any set of character from any string. The first argument would be the string, the second argument would be the characters to remove. For example:
$ myscript "My name's Santiago. What's yours?" "atu"
My nme's Snigo. Wh's yors?
I wrote the... (11 Replies)
Hello,
Is there a simpler way to remove special characters (color codes) from each lines in a log file?
I use sed like in the example below but I think there should be a more simple way to achieve the same result:
$ cat -vet file1
^, , , ,
Maybe to convert the file somehow?
... (5 Replies)
Dear Members,
We have a file which contains some special characters. I need to replace these special character by a new line character(\n).
The Special character is \x85.
I am not sure what this character means and how we can remove it.
Any inputs are greatly appreciated.
Thanks... (5 Replies)
hello all
I am writing a perl code and i wish to remove the special characters for text.
I wish to remove all extended ascii characters. If the list of special characters is huge, how can i do this using substitute command
s/specialcharacters/null/g
I really want to code like... (3 Replies)
Hi All,
I have a variable like
AVAIL="\
BACK:bkpstg:testdb3.iad.expertcity.com:backtest|\
#AUTH:authstg:testdb3.iad.expertcity.com:authiapd|\
TEST:authstg:testdb3.iad.expertcity.com:authiapd|\
"
What I want to do here is that If a find # before any entry, remove the entire string... (5 Replies)
Hi,
I have a input of the form:
..., word1, word2, word3...
I want out put of the form
word1, word2, word3
I tried echo '..., word1, word2, word3...' | tr -d '...,'
but that takes out the commas in the middle too so I get
word1 word2 word3
but I want the commas in the middle.
... (3 Replies)
Hi,
I have string like this ="Lookup Procedure"
But i want the output like this Lookup Procedure
=," should be removed.
Please suggest me the solution.
Regards,
Madhuri (2 Replies)
Hi Gurus,
I have file which contains some unicode charachator like "ü". I want to replace it with some charactors. I searched in internet and got command sed "s/ü/-/g", but I don't know how to type ü in unix command line.
Please help me for this one.
Thanks in advance (7 Replies)
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
LEARN ABOUT HPUX
cat
cat(1) General Commands Manual cat(1)NAME
cat - concatenate, copy, and print files
SYNOPSIS
file ...
DESCRIPTION
reads each file in sequence and writes it on the standard output. Thus:
prints file on the default standard output device;
concatenates file1 and file2, and places the result in file3.
If is appears as a file argument, uses standard input. To combine standard input and other files, use a combination of and file arguments.
Options
recognizes the following options:
Omit line numbers from blank lines when
option is specified. If this option is specified, the option is automatically selected.
Print a
character at the end of each line (prior to the new-line). If this option is specified, the option is automatically selected.
Display output lines preceded by line numbers, numbered
sequentially from 1.
Replace multiple consecutive empty lines with one empty
line, so that there is never more than one empty line between lines containing characters.
Silent option.
suppresses error messages about non-existent files, identical input and output, and write errors. Normally, input and output
files cannot have identical names unless the file is a special file.
Print each tab character as
and form feed character as If this option is specified, the option is automatically selected.
Do not buffer output (handle character-by-character).
Normally, output is buffered.
Cause non-printing characters
(with the exception of tabs, new-lines and form-feeds) to be printed visibly. Control characters are printed using the form
(Ctrl-X), and the DEL character (octal 0177) is printed as (see ascii(5)). Single-byte control characters whose most signifi-
cant bit is set, are printed using the form where x is the character specified by the seven low order bits. All other non-
printing characters are printed as where x is the character specified by the seven low order bits. This option is influenced
by the environment variable and its corresponding code set.
EXTERNAL INFLUENCES
Environment Variables
provides a default value for the internationalization variables that are unset or null. If is unset or null, the default value of "C" (see
lang(5)) is used. If any of the internationalization variables contains an invalid setting, will behave as if all internationalization
variables are set to "C". See environ(5).
If set to a non-empty string value, overrides the values of all the other internationalization variables.
determines the interpretation of text as single and/or multi-byte characters, the classification of characters as printable, and the char-
acters matched by character class expressions in regular expressions.
determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error and informa-
tive messages written to standard output.
determines the location of message catalogues for the processing of
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
Exit values are:
0 Successful completion.
>0 Error condition occurred.
EXAMPLES
To create a zero-length file, use any of the following:
The following prints for all the occurrences of tab character in file1
To suppress error messages about files that do not exist, use:
If file2 does not exist, the above command concatenates file1 and file3 without reporting the error on file2. The result is the same if
option is not used, except that displays the error message.
To view non-printable characters in file2, use:
WARNINGS
Command formats such as
overwrites the data in file1 before the concatenation begins, thus destroying the file. Therefore, be careful when using shell special
characters.
SEE ALSO cp(1), more(1), pg(1), pr(1), rmnl(1), ssp(1).
STANDARDS CONFORMANCE cat(1)