I have a variable which consists of a string like this:
001 aaabc 44 a bbb12
How do I extract each substring, delimited by the spaces, into new variables - one for each substring?
eg var1 will be 001, var2 will be aaabc, var3 will be 44, var4 will be a, etc?
I've come up with this:... (2 Replies)
Hello,
I am an intermediate scripter. I can usually find and adapt what I need by searching through previous postings, but I'm stumped.
I have a string with the format "{Name1 Release1 Type1 Parent1} {Name2 Release2 Type2 Parent2}". It is being passed as an argument into a ksh script. I need to... (5 Replies)
Hi all,
I have a file of around 300 lines in which string "SERVER" occurs around 32 times.
for eg.
I need to split files like, for eg
I am using this code
awk '/SERVER/{n++}{print > f n}' f=/vikas/list /vikas/final
But the problem is that it makes maximum of 10 files, but I... (12 Replies)
i need one help....
if i have a string like aaaaa,bbbbb,ccccc,aaaaa
How to to split the string and check howmany times aaaaa will be in that string?
Thanks (7 Replies)
Hi ,I am trying to assign string to variable ,but it doesn't work
Also could you show me different ways to use grep,(I am trying to get the first,second and first column form file,and I am counting the chars)
let name=`grep "$id" product | cut -c6-20` (25 Replies)
Hello,
Why is this not working in a script?
files="test.fsa"
echo $files
for file in $files
do
if
then
echo "$file does not exist."
fi
run a command
done
I get an error saying (3 Replies)
I'm trying to write a basic bash script that takes input you give (what directory, if any, what name, if any ....) and passes the information to find.
I'm trying to just create a string with all variables and then pass it to find. So far I have this extremely simple:
#!/bin/bash -f
... (2 Replies)
Hi guys,
New to the forum, and been messing around with Linux for about a year now. I'm still very much a rookie, so just assume that I'm a total idiot:
I currently have a shell that spits out a CSV number string of about 8 numbers as follows:
1.00,2.00,3.00 ... ,8.00I need to assign a... (7 Replies)
Hi. I'd like to remove all values in a string variable that also exist in a second variable. What is the appropriate approach to take here? I can use a 'For' loop and check each element and then populate a new string. But is there a cleaner, simpler way?
E.g. I have the following 2 variables ... (19 Replies)
Discussion started by: user052009
19 Replies
LEARN ABOUT DEBIAN
maketext
MAKETEXT(1p) User Contributed Perl Documentation MAKETEXT(1p)NAME
maketext - translate and make messages
SYNOPSIS
maketext [OPTION] [--domain=TEXTDOMAIN] MSGKEY [PARAM...]
maketext [OPTION] -s MSGID [PARAM...]
DESCRIPTION
The "maketext" script translates a natural language message into the user's language, by looking up the translation in a message MO file,
and process the plural transformation with Maketext.
The "maketext" script is a command-line interface to Locale::Maketext::Gettext(3) (and Locale::Maketext(3)). It can be used in shell
scripts, etc, to translate, maketext and return the result. By this way, it enables Maketext to be integrated into other programming
languages/systems, like bash/csh, python, PHP, C, etc. It works like the command-line program gettext.
For example:
% maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 0 1
0 viruses were found in 1 file.
% maketext -s "[*,_1,virus was,viruses were] found in [*,_2,file,files]." 1 3
1 virus was found in 3 files.
%
OPTIONS -d,--domain=TEXTDOMAIN
Retrieve translated messages from TEXTDOMAIN.
-s Adds a new line to the end of the output so that it behaves like the `echo' or the `gettext' command.
-h,--help
Display the help messages.
-V,--version
Display version information and exit.
MSGKEY
The original text used to look up translated text.
PARAM...
Parameters to Maketext for the plural and other text functions.
ENVIRONMENT
TEXTDOMAIN
TEXTDOMAIN is used to determine the text domain when the -d parameter is not given.
TEXTDOMAINDIR
TEXTDOMAINDIR is used to search the message catelog/MO file if it does not reside in the system locale directories.
NOTES
Maketext language function override, like "quant" or "numerate", is not available here. Suggestions are welcome.
The current system locale directory search order is: /usr/share/locale, /usr/lib/locale, /usr/local/share/locale, /usr/local/lib/locale.
Suggestions are welcome.
BUGS
Report bugs to imacat <imacat@mail.imacat.idv.tw>
SEE ALSO Locale::Maketext(3), Locale::Maketext::TPJ13(3), Locale::Maketext::Gettext(3), Locale::Maketext::Gettext::Functions(3), bindtextdomain(3),
textdomain(3). Also, please refer to the official GNU gettext manual at <http://www.gnu.org/software/gettext/manual/>.
AUTHOR
imacat <imacat@mail.imacat.idv.tw>
COPYRIGHT
Copyright (c) 2003-2007 imacat. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
perl v5.10.0 2007-03-28 MAKETEXT(1p)