Folks,
Is there a simple way to replace one digit by two digit using sed.
Example,
mydigit1918_2006_8_8_lag1.csv should be
mydigit1918_2006_08_08_lag01.csv.
I tried this way, but doesn't work.
echo mydigit1989_2006_8_8_lag1.csv|sed 's/]/0]/'
Thank you, (5 Replies)
Hi All,
How can i convert a number 24 to 0024
In the same way how can i convert 123 to 0123?
All this has to be done inside a script
Thanks in advance
JS (6 Replies)
I have looked for hours for an answer, so I have decided to request your guidance.
I want to substract the first number (series of digits) contained in a string. This string is the output of another command. The substring (number) can be located at any position inside the string.
I want to... (4 Replies)
I have a var storing date
var=`date`
Now the date is returned as
Mon Feb 2 00:25:48 PST 2009
Is there any way to check the date field alone ("2" in above case) and if its a single digit then add a prefix 0 to it and store the result in same variable "var"
My intention in above case is... (3 Replies)
Hi guys,
Can someone help me out with this:
I have a directory with files like the following,
GHost++ 2010-03-14 04-01 DotaCash RD us_ca LC #7 (44m19s).w3g
GHost++ 2010-03-14 04-06 DotaCash AP us_ca LC #8 (42m24s).w3g
GHost++ 2010-03-14 04-07 DotaCash AR us_ca LC #10 (08m23s).w3g ... (4 Replies)
Hi Masters,
here is my req
I have to create a 12 digit string which includes the user i/p
Like if user input 2334 then the string will be 233411111111 ,if the user inputs 23345 then the string will be 233451111111 ,
So we dont know how many digits will the user inputs output will be 12... (16 Replies)
Hi every body!
I wrote script on Fedora (bash shell) to check whether a tring enter from user console is start with a uppercase/lowercase letter or a digit. But with this script i have some problem when I enter from character from 'b' to 'z' --> result is uppercase. This code look like ok but i... (9 Replies)
Hello,
I would like to convert this string
KBL3TEST1 into KBL3TEST
How can i code this?
Any help is appreciated
regards,
blashyou (6 Replies)
Discussion started by: blashyou
6 Replies
LEARN ABOUT REDHAT
iswalpha
ISWALPHA(3) Linux Programmer's Manual ISWALPHA(3)NAME
iswalpha - test for alphabetic wide character
SYNOPSIS
#include <wctype.h>
int iswalpha(wint_t wc);
DESCRIPTION
The iswalpha function is the wide-character equivalent of the isalpha function. It tests whether wc is a wide character belonging to the
wide character class "alpha".
The wide character class "alpha" is a subclass of the wide character class "alnum", and therefore also a subclass of the wide character
class "graph" and of the wide character class "print".
Being a subclass of the wide character class "print", the wide character class "alpha" is disjoint from the wide character class "cntrl".
Being a subclass of the wide character class "graph", the wide character class "alpha" is disjoint from the wide character class "space"
and its subclass "blank".
Being a subclass of the wide character class "alnum", the wide character class "alpha" is disjoint from the wide character class "punct".
The wide character class "alpha" is disjoint from the wide character class "digit".
The wide character class "alpha" contains the wide character classes "upper" and "lower".
The wide character class "alpha" always contains at least the letters 'A' to 'Z' and 'a' to 'z'.
RETURN VALUE
The iswalpha function returns non-zero if wc is a wide character belonging to the wide character class "alpha". Otherwise it returns zero.
CONFORMING TO
ISO/ANSI C, UNIX98
SEE ALSO isalpha(3), iswctype(3)NOTES
The behaviour of iswalpha depends on the LC_CTYPE category of the current locale.
GNU 1999-07-25 ISWALPHA(3)