I don't think it's wise to get rid of them, because they separate (and thus define) the words. Leave them in, count them, and then eliminate the "blank" count.
Those non-ASCII opening and closing double quotes are multibyte unicode characters. It might be easier to convert them to ASCII- quotes beforehand. Same holds true mayhap for the "blank" chars above...
Once converted, this
might give you a feeling for the "speech length".
Hello,
I read a file whose in lines are datas and between thses datas there is blank characters (10, 12 or 5 or 1 .......)
So when i use the command while read line in the script(see under) there is also only one character between the datas and the others blank characters are not here.
... (3 Replies)
Hi,
I am trying to do two things in my script. I will really appreciate any help in this regards.
Is there a way to delete a last line from a pipe delimited flat file if the last line is blank. If the line is not blank then do nothing.....
Is there a way to count a word that are starting... (4 Replies)
Does anyone of you know how to turn off color and weird characters on bash shell when using the command "script"? Everytime users on my server used that command to record their script, they either couldn't print it because lp kept giving the "unknown format character" messages or the print paper... (1 Reply)
Hi.
I have files in my OS that has weird file names with not-conventional ascii characters.
I would like to run them but I can't refer them.
I know the ascii # of the problematic characters.
I can't change their name since it belongs to a 3rd party program... but I want to run it.
is there... (2 Replies)
Hi everyone,
I'm trying to write a shell script that process a log file. The log format is generally:
(8 digit hex of unix time),(system ID),(state)\n
My shell script gets the file from the web, saves it in a local text directory. I then want to change the hex to decimal, convert from unix time... (7 Replies)
I just finish the shell script .
This shell can replace weird characters (such as #$%^@!'"...) in file or directory name by "_"
I spent long time on replacing apostrophe in file/directory name
added: 2012-03-14
the 124th line (/usr/bin/perl -i -e "s#\'#\\'#g" /tmp/rpdir_level$i.tmp) is... (5 Replies)
Hi,
I was trying to remove the blank from beginning of a line.
when I try:
sed 's/^ +//' filename
it does not work
but when I try
sed 's/^ *//' filename
it works
But I think the first command should have also replaced any line with one or more blanks.
Kindly help me in understanding... (5 Replies)
Dear all,
I have the files: xaa xab xac
and I try to paste them using $paste -d, xaa xab xac
I see:
output
3e-130
,6e-78
,5e-74
6e-124
,0,007
,0,026
2e-119
When I type: $ paste -d, xaa xab xac |less
I see:
output
3e-130^M,6e-78^M,5e-74
6e-124^M,0,007^M,0,026 (2 Replies)
I am using Korn shell on Linux 2.6x platform , and I am suing the following code to capture the lines which contain CONTROL CHARACTERS in my file :
awk '/]/ {print NR}' EROLLMENT_INPUT.txt
The problem is that this code shows the file has control characters when the file is in folder A ,... (2 Replies)
Hi All
Need Help
I have a file with the below format (ABC.TXT) :
®¿¿ABCDHEJJSJJ|XCBJSKK01|M|7348974982790
HDFLJDKJSKJ|KJALKSD02|M|7378439274898
KJHSAJKHHJJ|LJDSAJKK03|F|9898982039999
(cont......)
I need to write a script where it will check for : blank lines (between rows,before... (6 Replies)
Discussion started by: chatwithsaurav
6 Replies
LEARN ABOUT PLAN9
ascii
ASCII(1) General Commands Manual ASCII(1)NAME
ascii, unicode - interpret ASCII, Unicode characters
SYNOPSIS
ascii [ -8 ] [ -oxdbn ] [ -nct ] [ text ]
unicode [ -nt ] hexmin-hexmax
unicode [ -t ] hex [ ... ]
unicode [ -n ] characters
look hex /lib/unicode
DESCRIPTION
Ascii prints the ASCII values corresponding to characters and vice versa; under the -8 option, the ISO Latin-1 extensions (codes 0200-0377)
are included. The values are interpreted in a settable numeric base; -o specifies octal, -d decimal, -x hexadecimal (the default), and -bn
base n.
With no arguments, ascii prints a table of the character set in the specified base. Characters of text are converted to their ASCII val-
ues, one per line. If, however, the first text argument is a valid number in the specified base, conversion goes the opposite way. Control
characters are printed as two- or three-character mnemonics. Other options are:
-n Force numeric output.
-c Force character output.
-t Convert from numbers to running text; do not interpret control characters or insert newlines.
Unicode is similar; it converts between UTF and character values from the Unicode Standard (see utf(6)). If given a range of hexadecimal
numbers, unicode prints a table of the specified Unicode characters -- their values and UTF representations. Otherwise it translates from
UTF to numeric value or vice versa, depending on the appearance of the supplied text; the -n option forces numeric output to avoid ambigu-
ity with numeric characters. If converting to UTF , the characters are printed one per line unless the -t flag is set, in which case the
output is a single string containing only the specified characters. Unlike ascii, unicode treats no characters specially.
The output of ascii and unicode may be unhelpful if the characters printed are not available in the current font.
The file /lib/unicode contains a table of characters and descriptions, sorted in hexadecimal order, suitable for look(1) on the lower case
hex values of characters.
EXAMPLES
ascii -d
Print the ASCII table base 10.
unicode p
Print the hex value of `p'.
unicode 2200-22f1
Print a table of miscellaneous mathematical symbols.
look 039 /lib/unicode
See the start of the Greek alphabet's encoding in the Unicode Standard.
FILES
/lib/unicode
table of characters and descriptions.
SOURCE
/sys/src/cmd/ascii.c
/sys/src/cmd/unicode.c
SEE ALSO look(1)tcs(1), utf(6), font(6),
ASCII(1)