If you put the ^ symbol inside the character class, it will not negate the pattern. It means , match the patter starting with. So the following code is not at all work.
Instead of that you should use the following code
Here the symbol ^ outside of the character class negate the pattern. The symbol ^ Inside character class represent the starting.
How can I delete those lines that starts with a certain letter?
abc def ghi
xyz abc def
ace gik moq
abe imq gxm
I want to delete the line that starts with "x". Thanks! (4 Replies)
Hi Guys,
I have an awk script that would search the input file for line that starts with a number 3 and copies into a new text file.
I want to extend this script to find the lines that either starts with 3 or a or b and copy all those lines into the new file.
Here is what I have so far:... (1 Reply)
Hi, I have one file, I need to check if file exist or not and then remove the lines which starts with ?
My file1.out data is some thing
abcabcppp
xyzxyzpqr
?????????
?????????
Output should be in test.out
abcabcppp
xyzxyzpqr
I am getting the output as below but the File does not exist... (4 Replies)
example:
comment Now_TB.table column errac is for error messages
1 - first
2 - second
3 -third ;
in this example I need to be able to grab the comment as first word and ; as the last word and it might span a few lines. I need it to be put all in one line without line breaks so I can... (4 Replies)
I have requirement in my every files starting lines have # needs to be not processing or exclude the that lines.
I have written a code like below, but now working as expected getting ERROR" line 60:
1 #!/bin/sh
2 echo ======= LogManageri start ==========
3
4 #This directory is... (1 Reply)
I have a file like below
#Fields section bald
1234 2345 456 222
abcs dddd dddd ssss
mmmm mmm mmm
i need do not process a files stating with #
I was written code below
while read -r line
do
if
then
echo ${line} >>
elif
then
... (3 Replies)
This is on a CentOS box, I have two scripts that need to run in order.
I want to write a shell script that calls the first script, lets it run and then terminates it after a certain number of hours (that I specify of course), and then calls the second script (they can't run simultaneously) which... (3 Replies)
Discussion started by: btramer
3 Replies
LEARN ABOUT REDHAT
iswpunct
ISWPUNCT(3) Linux Programmer's Manual ISWPUNCT(3)NAME
iswpunct - test for punctuation or symbolic wide character
SYNOPSIS
#include <wctype.h>
int iswpunct(wint_t wc);
DESCRIPTION
The iswpunct function is the wide-character equivalent of the ispunct function. It tests whether wc is a wide character belonging to the
wide character class "punct".
The wide character class "punct" is a subclass of the wide character class "graph", and therefore also a subclass of the wide character
class "print".
The wide character class "punct" is disjoint from the wide character class "alnum" and therefore also disjoint from its subclasses "alpha",
"upper", "lower", "digit", "xdigit".
Being a subclass of the wide character class "print", the wide character class "punct" is disjoint from the wide character class "cntrl".
Being a subclass of the wide character class "graph", the wide character class "punct" is disjoint from the wide character class "space"
and its subclass "blank".
RETURN VALUE
The iswpunct function returns non-zero if wc is a wide character belonging to the wide character class "punct". Otherwise it returns zero.
CONFORMING TO
ISO/ANSI C, UNIX98
SEE ALSO ispunct(3), iswctype(3)NOTES
The behaviour of iswpunct depends on the LC_CTYPE category of the current locale.
This function's name is a misnomer when dealing with Unicode characters, because the wide character class "punct" contains both punctuation
characters and symbol (math, currency, etc.) characters.
GNU 1999-07-25 ISWPUNCT(3)