Sponsored Content
Homework and Emergencies Homework & Coursework Questions Removing punctuations from file input or standard input Post 302894178 by joeyg on Monday 24th of March 2014 08:56:25 AM
Old 03-24-2014
Research regular expressions.
The following are some of the special groups that can be specified:
[:alnum:] - Alphanumeric characters.
[:alpha:] - Alphabetic characters
[:blank:] - Blank characters: space and tab.
[:digit:] - Digits: '0 1 2 3 4 5 6 7 8 9'.
[:lower:] - Lower-case letters: 'a b c d e f g h i j k l m n o p q r s t u v w x y z'.
[:space:] - Space characters: tab, newline, vertical tab, form feed, carriage return, and space.
[:upper:] - Upper-case letters: 'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl question - removing line from input file

In perl I want to do remove the top line of my input file then process the next line. I want to do something like head -1 inputfile > temp grep -v temp inputfile > newinputfile cp newinputfile inputfle is this possible in perl? (3 Replies)
Discussion started by: reggiej
3 Replies

2. Shell Programming and Scripting

standard input

how can i redirect standard input? i dont remember :/, though could you redirec not from a command? i mean, to redirect always stdin and stout (1 Reply)
Discussion started by: Jariya
1 Replies

3. Shell Programming and Scripting

How to copy from standard input

I tried copy the output files from find command into a directory. Example, find / -name core 2>/dev/null | xargs cp???? I have known that we can use xargs to execute command lines from standard input but how to use it in this case. Or I can do something besides xargs. (2 Replies)
Discussion started by: lalelle
2 Replies

4. UNIX for Dummies Questions & Answers

removing directory in an input file

Hi, How can I removed the directory in the input file? The script responsible for storing the report in an input file is this: while }" ] do echo "penetration|${penfilename}|${penfilenamedaterange}" >> ${OUT_DIR}/penrpt_emailfile.txt (( i=i+1 )) done For the penfilename: ... (2 Replies)
Discussion started by: chrysSty
2 Replies

5. Shell Programming and Scripting

opening a file given as standard input

Hi I am trying to write a shell script which should take the file as standard input. As file(content and name both) will change for each run. It should read the file line by line. with each line I have to perform certain operation. For example I have i file foo, it looks like /usr/doc/abc... (4 Replies)
Discussion started by: shashiprakash81
4 Replies

6. Solaris

standard input

Please give me any example for standard input in Solaris. (6 Replies)
Discussion started by: karman0931
6 Replies

7. Shell Programming and Scripting

Reading Standard Input

Hello, I am new to scripting. How do I read multiple lines from the command line? I know read reads one line, but if I have to read multiple lines, how should I do? Thanks, Prasanna (4 Replies)
Discussion started by: prasanna1157
4 Replies

8. Shell Programming and Scripting

Reading from standard input

So, I am new to shell scripting and have a few problems. I know how to read from standard input but I do not know how to really compare it to say, a character. I am trying to compare it to a character and anything exceeding just a character, the user will get an output message, but the program... (7 Replies)
Discussion started by: Bungkai
7 Replies

9. UNIX for Dummies Questions & Answers

Copying and Renaming file through standard input

Hi Geeks, I am relatively new to Unix. Trying out to achive a shell script by hard learning. Here is my requirment. 1. I have to search for specified strings that are given in .csv file in the directory to find the files for matching strings in the .csv file. 2. If match is found, copy... (1 Reply)
Discussion started by: uunniixxuusseer
1 Replies

10. Shell Programming and Scripting

Use the content of a file as standard input

I want to use a content of a file as standard input to a program and dump the output to a file. However, when I try the following code: ./program < input.in > output.out The output.out is empty. So, how can I handle this problem? Thanks in advance! (11 Replies)
Discussion started by: Ray Sun
11 Replies
wctype(3)						     Library Functions Manual							 wctype(3)

NAME
wctype - Gets a handle to classify wide characters LIBRARY
Standard C Library (libc) SYNOPSIS
#include <wctype.h> wctype_t wctype( const char *property); The following prototype for wctype() does not conform to current industry standards and is supported only for backward compatibility: #include <wchar.h> wctype_t wctype( char *property); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: wctype(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to a string that identifies a character class, or property. DESCRIPTION
The wctype() function obtains a handle for valid property names for wide characters, as defined in the current locale. The handle can then be used as the wc_prop parameter in a subsequent call to the iswctype() function to check whether a wide character has this property. (See the iswctype(3) reference page.) Values returned by the wctype() function are valid until the setlocale() function modifies the value of the LC_CTYPE environment variable. The property parameter can have a value equal to one of the basic character classes or to any other character class that is defined for a locale. The characters included in each class are specified in the locale definition file (see the localedef(1) and locale(4) reference pages for more information). The basic character classes are as follows: A combination of the classes alpha and digit. Alphabetic (letter) characters. This class automatically includes characters in the upper and lower classes. Blank char- acters, such as the space or tab character. Control characters. This class does not include characters in the alpha or print class. Numeric digit characters. This class includes the following characters: 0 1 2 3 4 5 6 7 8 9 Graphic characters for printing. This class does not include characters in the space or cntrl class but includes all characters in the alpha, digit, and punct classes. Lowercase characters. This class does not include characters in the cntrl, digit, punct, or space class. At a minimum, the lower class includes the 26 lowercase US-ASCII characters. These are: a b c d e f g h i j k l m n o p q r s t u v w x y z Print characters. This class includes characters in the graph and space classes but does not include characters in the cntrl class. Punctuation characters. This class does not include characters in the space, alpha, digit, or cntrl class. Space characters. At a minimum, this class includes the space, form-feed, newline, carriage-return, tab, and vertical-tab characters. Uppercase characters. At a minimum, this class includes the 26 uppercase US ASCII characters. These are: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Hexadecimal characters. This class includes the following characters: 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f For the list of supplemental properties that can be defined in Unicode locales, see the locale(4) reference page. On Tru64 UNIX systems, Unicode character properties are defined only in locales whose names end in .UTF-8. RETURN VALUES
On successful completion, the wctype() function returns a value of type wctype_t, which is a handle for valid property names in the current locale. If the property parameter specifies a character class that is not valid for the current locale, the function returns the value 0 cast to wctype_t. RELATED INFORMATION
Commands: localedef(1) Files: locale(4) Functions: ctype(3), iswctype(3), setlocale(3), towupper(3), wctrans(3) delim off wctype(3)
All times are GMT -4. The time now is 02:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy