04-15-2010
i tried both, but i still get errors. Right now code is,
set -A array `grep -v "#" ${file}`
x=0;while [ ${x} -lt ${#ARRAY[*]} ] ; do ARRAY[$x]=$(tr [A-Z] [a-z] <<< ${ARRAY[$x]}); let x++; done
x=0;while [ ${x} -lt ${#ARRAY[*]} ] ; do echo ${ARRAY[$x]}; let x++; done
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How can convert a Lower case variable value to an upper case in the kron shell script. (3 Replies)
Discussion started by: dchalavadi
3 Replies
2. Shell Programming and Scripting
Hi, I have a variable $Ctrcd which contains country names in upper case and i want to convert them into lower case. I have tried so many solutions from already existing threads but couldn't get the correct one.
Can anybody help me with this.....
Thanks a lot.. (2 Replies)
Discussion started by: manmeet
2 Replies
3. Shell Programming and Scripting
I have a package to install and the installation script which does it . The files/directories names in the script are all lower case but the actual package has everything in upper case - file names, directories . I don't want to rename directories and files in the package - it has a lot of them . ... (2 Replies)
Discussion started by: vz6zz8
2 Replies
4. UNIX for Dummies Questions & Answers
Hi, All -
I have a script where I need to change the server name from "dallinux01" to "DALLINUX01" in multiple places.
Can some one tell me a command that I can use for this? I played with the tr (translate) command but tr works byte by byte. Meaning that when I use the tr command all... (3 Replies)
Discussion started by: ora_umair
3 Replies
5. Shell Programming and Scripting
Hi All
I have a script which extracts values from a Database (A persons name) and puts it into a variable in my script IE: $NAME
However the Value in the DB is all in uppercase and contains the users first name and last name
EG:
> echo $NAME
GRAHAM BOYLE
>
What I need is only the... (7 Replies)
Discussion started by: grahambo2005
7 Replies
6. Shell Programming and Scripting
Is there a command that can switch a character variable from UPPER case to lower case?
like
foreach AC ( ABC BCD PLL QIO)
set ac `COMMAND($AC)`
...
end
Thanks a lot! (3 Replies)
Discussion started by: rockytodd
3 Replies
7. Shell Programming and Scripting
Hello Unix Gurus :
It would be really appreciative if can find a solution for this .
I have records in a file .
I need to Capitalize the records based on condition .
For Example i tried the following Command
COMMAND -->
fgrep "2000YUYU" /export/home/oracle/TST/data.dat | tr '' ''... (12 Replies)
Discussion started by: tsbiju
12 Replies
8. Shell Programming and Scripting
here is a code
column_name="vivek"
column_name2="ViVeK"
column_name=$(echo $column_name | awk '{print tolower($0)}')
column_name2=$(echo $column_name2 | awk '{print tolower($0)}')
echo "column name 1 lower: $column_name"
echo "column name... (6 Replies)
Discussion started by: vivek d r
6 Replies
9. UNIX for Dummies Questions & Answers
There is a script where we pass the parameter in lower case:
say: . ./scriptName pArameter
#!/bin/ksh
echo "`date` Entering $0 Reloading the $1 table "
mname1=$1
(code to login MYSQL Database)
Truncate table $mname1;
exit
!
Since now there is a limitaion of MYSQL that it accept... (5 Replies)
Discussion started by: ambarginni
5 Replies
10. Shell Programming and Scripting
Hi all,
I am trying to find a way to change first letter in a word from lower case to upper case. It should be done for each first word in text or in paragraph, and also for each word after punctuation like
. ; : ! ?I found the following command
sed -i 's/\s*./\U&\E/g' $@ filenamebut... (7 Replies)
Discussion started by: georgi58
7 Replies
LEARN ABOUT DEBIAN
math::polygon::clip
Math::Polygon::Clip(3pm) User Contributed Perl Documentation Math::Polygon::Clip(3pm)
NAME
Math::Polygon::Clip - frame a polygon in a square
INHERITANCE
Math::Polygon::Clip
is a Exporter
SYNOPSIS
my @poly = ( [1,2], [2,4], [5,7], [1, 2] );
my @box = ( $xmin, $ymin, $xmax, $ymax );
my $boxed = polygon_clip @box, @poly;
DESCRIPTION
Cut-off all parts of the polygon which are outside the box
FUNCTIONS
polygon_fill_clip1(ARRAY-BOX, LIST-OF-POINTS)
Clipping a polygon into rectangles can be done in various ways. With this algorithm (which I designed myself, but may not be new), the
parts of the polygon which are outside the BOX are mapped on the borders. The polygon stays in one piece.
Returned is one list of points, which is cleaned from double points, spikes and superfluous intermediate points.
polygon_fill_clip2(ARRAY-BOX, LIST-OF-POINTS)
To be implemented. The polygon falls apart in fragments, which are not connected: paths which are followed in two directions are
removed. This is required by some applications, like polygons used in geographical context (country contours and such).
polygon_fill_clip3(ARRAY-BOX, OUT-POLY, [IN-POLYS])
To be implemented. A surrounding polygon, with possible inclussions.
polygon_line_clip(ARRAY-BOX, LIST-OF-POINTS)
Returned is a list of ARRAYS (possibly 0 long) containing line pieces from the input polygon (or line).
example:
my @points = ( [1,2], [2,3], [2,0], [1,-1], [1,2] );
my @bbox = ( 0, -2, 2, 2 );
my @l = polygon_line_clip @bbox, @points;
print scalar @l; # 1, only one piece found
my @first = @{$l[0]}; # first is [2,0], [1,-1], [1,2]
SEE ALSO
This module is part of Math-Polygon distribution version 1.02, built on September 19, 2011. Website: http://perl.overmeer.net/geo/
LICENSE
Copyrights 2004,2006-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.12.4 2011-09-19 Math::Polygon::Clip(3pm)