Hi,
I would like extract from a file a character or pattern after ( n + 1) a specific pattern (n) . ( i supposed with awk)
how could i do ?
Thanks in advance. (1 Reply)
If I have a string defined as:
MyString=abcde
echo $MyString
How can I loop through it character by character? I haven't been able to find a way to index the string so that I loop through it.
shew01 (10 Replies)
ps -eaf | grep “oracleTRLV (LOCAL=NO)” | while read ora_proc
do
echo $ora_proc
done
I would like to modify the above shell so that if character 13 and 14 equal "12" to do something.
Sorry I'm new to shell:( (14 Replies)
continuing from my previous post, whose link is given below as a reference
https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569
consider there is create table commands in a file for eg:
CREATE TABLE `Blahblahblah` (
`id` int(11) NOT NULL... (2 Replies)
Suppose there are two files:
A, format is like:
line1 12
line2 33
line3 6
...
B, format is like:
>header
taaccctaaccctaaccctaacccaaccccaccccaaccccaaccccaac
ccaaccctaaccctaaccctaacccaaccctaaccctaaccctaacccaa
ccctcaccctcaccctcaccctcaccctcaccctcaccctcaccctaacc... (1 Reply)
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Hello,
I have a file of strings a below:-
4358RYFHD9845
28/COC/UYF984
9834URD 98HJDU
I need to extract all the first numeric character of every sting as follows:-
4358
28
9834
thanks to suggest ASAP
Regards,
Jasi
Use code tags, thanks. (7 Replies)
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Discussion started by: fspalero
2 Replies
LEARN ABOUT CENTOS
text::charwidth
CharWidth(3) User Contributed Perl Documentation CharWidth(3)NAME
Text::CharWidth - Get number of occupied columns of a string on terminal
SYNOPSIS
use Text::CharWidth qw(mbwidth mbswidth mblen);
mbwidth(string);
mbswidth(string);
mblen(string);
DESCRIPTION
This module supplies features similar as wcwidth(3) and wcswidth(3) in C language.
Characters have its own width on terminal depending on locale. For example, ASCII characters occupy one column per character, east Asian
fullwidth characters (like Hiragana or Han Ideograph) occupy two columns per character, and combining characters (apperaring in ISO-8859-11
Thai, Unicode, and so on) occupy zero columns per character. mbwidth() gives the width of the first character of the given string and
mbswidth() gives the width of the whole given string.
The names of mbwidth and mbswidth came from "multibyte" versions of wcwidth and wcswidth which are "wide character" versions.
mblen(string) returns number of bytes of the first character of the string. Please note that a character may consist of multiple bytes in
multibyte encodings such as UTF-8, EUC-JP, EUC-KR, GB2312, or Big5.
mbwidth(string) returns the width of the first character of the string. mbswidth(string) returns the width of the whole string.
Parameters are to be given in locale encodings, not always in UTF-8.
SEE ALSO locale(5), wcwidth(3), wcswidth(3)AUTHOR
Tomohiro KUBOTA, <kubota@debian.org>
COPYRIGHT AND LICENSE
Copyright 2003 by Tomohiro KUBOTA
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.16.3 2003-06-25 CharWidth(3)