hey,
im looking for a way of extending a string in shell script.
for example i have two strings "." and "abcd",
i need to extend the first string so that it is the same length as the second.
so "." and "abcd" becomes "...." and "abcd",
could someone shed light on how to do this ? thanks (4 Replies)
Hi all,
I had a typical problem.
I am using a parameter
PK="PK1 PK2 PK3"
i need to build the string
a.PK1=b.PK1 and a.PK2=b.PK2 and a.PK3=b.PK3
Please help (8 Replies)
Hi
I need help with a script to read certain strings from a file, the content is as below.
File A
=====
grant select on *.* TO 'root'@'localhost' identified by password 'sfsdfsdfsd';
I need all the words between grant and TO in to a new file.
I also need the value right next to... (13 Replies)
Hi,
I am new to Unix server and shell scripting.I want to encrypt username/password using shell script.I know that there's a Crypt command to encrypt but it is not installed in my unix server and cannot be installed due to some reason.So i want the shell script of the crypt command or is there... (3 Replies)
I am writing a shell script for some purpose. I have a variable of the form -- var1 = "policy=set policy"
Now I need to manipulate the variable var to get the string after index =. that is i should have "set polcy". Also I need to to this for many other variables where the value of "=" is not... (3 Replies)
HI,
I have a string "NZ-deploy-mode-1.15-Linux.x86_64.rpm"
I want to get the string before -1 ie "NZ-deploy-mode"
Input is "NZ-deploy-mode-1.15-Linux.x86_64.rpm"
expected output is "NZ-deploy-mode"
How can I do that in shell script?
Thanks in advance. (6 Replies)
Hi All,
I am trying to to compare a string variable with a string literal inside a loop but keep getting the
./testifstructure.sh: line 6:
#!/bin/sh
BOOK_LIST="BOOK1 BOOK2"
for BOOK in ${BOOK_LIST}
do
if
then echo '1'
else
echo '2'
fi
done
Please use next... (1 Reply)
Hi All,
I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement:
assume my file has content:
hello= gsdgsd sfdsg sgdsg sgdgdg
world= gggg hhhh iiiii
xxxx= pppp ppppp pppp
my... (1 Reply)
What does -a operator for String manipulation imply?
Eg: if ;then (2 Replies)
Discussion started by: Sree10
2 Replies
LEARN ABOUT DEBIAN
html::microformats::datatype::string
HTML::Microformats::Datatype::String(3pm) User Contributed Perl Documentation HTML::Microformats::Datatype::String(3pm)NAME
HTML::Microformats::Datatype::String - text in a particular language
SYNOPSIS
my $string = HTML::Microformats::Datatype::String
->new('Bonjour', 'fr');
print "$string
";
DESCRIPTION
Constructor
"$str = HTML::Microformats::Datatype::String->new($text, [$lang])"
Creates a new HTML::Microformats::Datatype::String object.
Public Methods
"$str->lang"
Return the language code.
"$str->to_string"
Return a plain (scalar) string.
Functions
"$str = ms($text, [$element])"
Construct a new HTML::Microformats::Datatype::String object from a scalar, plus XML::LibXML::Element. If $element is undef, then
returns the plain (scalar) string itself.
This function is exported by default.
(Note: the name 'ms' originally stood for 'Magic String'.)
"isms($str)"
Returns true iff $str is blessed as a HTML::Microformats::Datatype::String object.
This function is exported by default.
"$c = concat($a, $b, [$reverse])"
Concatenates two strings.
If the language of string $b is null or the same as $a, then the resultant string has the same language as $a. Otherwise the result has
no language.
If $reverse is true, then the strings are concatenated with $b preceding $a.
This function is not exported by default.
Can also be used as a method:
$c = $a->concat($b);
"compare($a, $b)"
Compares two strings alphabetically. Language is ignored.
Return values are as per 'cmp' (see perlfunc).
This function is not exported by default.
Can also be used as a method:
$a->compare($b);
BUGS
Please report any bugs to <http://rt.cpan.org/>.
SEE ALSO
HTML::Microformats, HTML::Microformats::Datatype.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT
Copyright 2008-2011 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
perl v5.14.2 2011-12-06 HTML::Microformats::Datatype::String(3pm)